geometry - Max spread of multiple points -
i have group of points (x,y) , need find out distance between 2 farthest apart.
what efficient way find this?
thanks
well, compairing every point against every other point not efficient.
the efficient way involves finding convex hull, convex polygon (no angles > 180) surrounding points.
after that, find farthest points on hull, using antipodal pairs.
algorithm described here:
http://www.seas.gwu.edu/~simhaweb/cs153/lectures/module1/module1.html
Comments
Post a Comment