Lets say I have point (x,y,z) and plane with point (a,b,c) and normal (d,e,f). I want to find the point that is the result of the orthogonal projection of the first point o
The projection of a point q = (x, y, z) onto a plane given by a point p = (a, b, c) and a normal n = (d, e, f) is
q = (x, y, z)
p = (a, b, c)
n = (d, e, f)
q_proj = q - dot(q - p, n) * n
This calculation assumes that n is a unit vector.
n