Distance computations are fundamental in computational geometry, and there are well-known formulas for them. Nevertheless, due to differences in object representations, there are alternative solutions to choose from. We will give some of these and indicate the situations they apply to.
We present several basic methods for representing planes in 3D space, and how to compute the distance of a point to a plane.
The intersection of geometric primitives is a fundamental construct in many computer graphics and modeling applications. Here we look at the algorithms for the simplest 2D and 3D linear primitives: lines, segments and planes.
mkdir build
cd build
cmake ..
make
./build/point2Line
./build/point2Plane
./build/geometryIntersection
Lines and distance of a point and a line
Planes and distance of a point and a line
Intersections of lines and planes
Operator Overloading for 3D Vector