Intersection of two 4D scattered point sets
In this example, two 4-dimensional random point sets are given. The basic problem of finding the intersection of the two point sets is addressed here. To answer this, the points of both point sets which lie in the interior of the intersection of the convex hulls of the two point sets must be found. To achieve this, use of the plane coefficients of the two convex hulls is made, thus showing their necessity in computational geometry calculations.
Set the random number generator.
Define the first scattered point set.
Define the second scattered point set.
Find the plane coefficients of the convex hull of the first point set.
Find the points belonging to the second point set that are inside the convex hull of the first point set.
Find the plane coefficients of the convex hull of the second point set.
Find the points belonging to the first point set that are inside the convex hull of the second point set.
Find the intersection of the two point sets.
(c) 2014 by George Papazafeiropoulos First Lieutenant, Infrastructure Engineer, Hellenic Air Force Civil Engineer, M.Sc., Ph.D. candidate, NTUA