PDA

View Full Version : Finding the convex hull of a set of points



jenny_wui
05-16-2013, 01:06 PM
Hello every body, I need to find the convex hull of a set of points. Could any one help me how that can be done. Lastly, I need to find the boundary of the convex hull. Thanks.

Carmine
05-16-2013, 03:45 PM
The convex hull of a set of points (call it P) in a plane would be made up of line segments connecting some of the points in P. The convex hull of a set of points in 3-space (call it Q) would be made up of a set of triangles with vertices from Q. Do you have a 2D or 3D situation? Have you tried Googling 'Convex Hull'? I believe there's some free code you can get to do hulls. I think QHull is one of them.

Note: I'm not defining 'Convex Hull' in the statements above. I'm just describing what the geometric boundaries of 2D or 3D hulls would be.

jenny_wui
05-16-2013, 05:14 PM
I need to find convex hull in 2D. Actually I am looking for some relevant code in the net. Thanks.

Carmine
05-17-2013, 11:20 AM
2D is fairly straightforward. Maybe after reading overviews of some of the algorithms you can write it yourself? For 2D I suggest the gift wrapping approach. For 3D, I like the incremental approach.

jenny_wui
05-20-2013, 01:36 PM
Thanks, a nice implementation has been given to the following link:
http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain