Point in polyhedron (PIP) problem in 4-dimensional space
The point-in-polyhedron (PIP) problem asks whether each point of an arbitrary point set (query points) lies inside, outside, or on the boundary of the convex hull of another given point set (polyhedron in space).
Set the random number generator.
Set the points the convex hull of which defines the polyhedron.
Set the query points, i.e. the points for which it will be determined if they lie inside or outside the polyhedron formed by the convex hull of .
Find the plane coefficients of the convex hull of the initial point set.
Determine if the query points are inside or outside the polyhedron formed by the convex hull of . If is true, then the corresponding point is inside the polyhedron.
Find the coordinates of the query points which are inside the polyhedron.
(c) 2014 by George Papazafeiropoulos First Lieutenant, Infrastructure Engineer, Hellenic Air Force Civil Engineer, M.Sc., Ph.D. candidate, NTUA