- Make a vector from your
orig
point to the point of interest:
v = point-orig (in each dimension);
- Take the dot product of that vector with the unit normal vector
n
:
dist = vx*nx + vy*ny + vz*nz;
dist = scalar distance from point to plane along the normal
- Multiply the unit normal vector by the distance, and subtract that vector from your point.
projected_point = point - dist*normal;
Edit with picture:
I’ve modified your picture a bit. Red is v
. dist
is the length of blue and green, equal to v
dot normal
. Blue is normal*dist
. Green is the same vector as blue, they’re just plotted in different places. To find planar_xyz, start from point
and subtract the green vector.