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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -