You should be able to &quot;wrap a hull&quot; around all the points. If there is no hull that can be wrapped without intersecting a path segment, the path is not a solution.<p>Basically you are checking for line-plane intersections. A solution should outline a &quot;non-self-intersecting volume&quot;.