# Convex hull around polygon for cave mapping

For the purpose of mapping caves, we survey new passages so that we take main polygon (survey from point A to point B) and on each "node" (survey station A in example), we shoot multiple "splay shots" around the passage (in more or less random directions), so we obtain more information which can later be used to draw a map of the cave.

Doing this, we get a polygon with a "cloud" of points around the main line. My question is, whether is there a way to create a convex hull around this main line, using those "splay shots". This would be a great way to visualize cave passages.

Each survey leg has information about direction, inclination and length, with which we are able to get the 3d coordinate in space of each node.

• It will not be guaranteed that your sampled partions will be convex, so your mapping will be a crude approximation. Maybe you could provide an illustration of what you have in mind? – beyond Jan 14 '19 at 9:11
• Sure. Go to: katasterjam.si/Caves/Details?id=10904#dokumenti, click on 3D button. Then go to options icon, and tick checkbox "Splay legs". You will see gray splay legs around the main polygon. You can rotate the cave system. – MaticDiba Jan 14 '19 at 9:14
• Interesting. Well, you could generate convexe hulls for each of the sampling points and find the union of them. A rough approximation :) but maybe a better visualisation than the one you got already. There are several 3D QuickHull implementations available on the 'net. – beyond Jan 14 '19 at 9:21
• I see. That would probably be better then the one we use now. I'll try to investigate more. tnx – MaticDiba Jan 14 '19 at 9:22
• Search for QuickHull and 3D, this should lead you to some code you can use :) – beyond Jan 14 '19 at 9:24