How do I find the orthogonal projection of a point onto a plane
218 views (last 30 days)
Torsten on 23 Mar 2015
min: (x0+lambda*a0+mu*b0-x)^2 + (y0+lambda*a1+mu*b1-y)^2 + (z0+lambda*a2+mu*b2-z)^2
gives the distance squared from the point (x,y,z) to the plane
Differentiate the distance squared with respect to lambda and mu, set the partial derivatives to 0 and solve for lambda and mu.
If the result is lambda^, mu^, then
is the orthogonal projection of (x,y,z) onto the plane.
More Answers (1)
Noah on 3 Oct 2019
This is an old post, but it deserves a simpler answer. Your plane is spanned by vectors A and B, but requires some point in the plane to be specified in 3D space. Call a point in the plane P. You can compute the normal (call it "n" and normalize it). Then the projection of C is given by translating C against the normal direction by an amount dot(C-P,n).
% compute the normal
n = cross(A, B) ;
n = n / sqrt(sum(n.^2)) ;
% project onto the plane
C_proj = C - dot(C - P, n) * n