python Programming Glossary: subsamples
Speeding up a closest point on a hyperbolic paraboloid algorithm http://stackoverflow.com/questions/18858448/speeding-up-a-closest-point-on-a-hyperbolic-paraboloid-algorithm constants LARGE_VALUE 99999999.0 SMALL_VALUE 0.00000001 SUBSAMPLES 10.0 def closestPointOnLineSegment a b c ''' Given two points.. 0. closest_v 0. ii 0. dist LARGE_VALUE for i in range int SUBSAMPLES 1 v v0 v1 v0 i SUBSAMPLES a edge0 v e0 0 b edge1 v e0 1 closest_p.. LARGE_VALUE for i in range int SUBSAMPLES 1 v v0 v1 v0 i SUBSAMPLES a edge0 v e0 0 b edge1 v e0 1 closest_p closest_d closest_u..
|