continued from : http://www.html5gamedevs.com/topic/15523-getheightatcoordinates-alternative/?p=111175 same algo slightly modified for a ribbon : http://www.babylonjs-playground.com/#1QC4YQ#8
quick and dirty GC optimization : http://www.babylonjs-playground.com/#1QC4YQ#12 about the angle, I'm thinking about it ... something like getNormalsAt() and/or getSlopeAt() this runs at 58 fps on my laptop : http://www.babylonjs-playground.com/#1QC4YQ#13 as you can see there many subdivisions this would run faster with far less subdivisions