How to create 2 orthogonal planes from a given plane

4 views (last 30 days)
I have 3 points in 3D for example [1.2, 4.32, 5.88], [-32.2, -43.3, -23.3], [11, -12.2, -98.8] and found a plane of best fit and plotted it in 3D. Now I need to plot 2 orthogonal planes to the plane I just plotted. How can I do this? Thanks heaps!
  1 Comment
Jan
Jan on 8 Jan 2013
There is one and only one plane through 3 non-linear points. Therefore there is no reason for a "best fit".

Sign in to comment.

Answers (2)

Jan
Jan on 8 Jan 2013
P1 = [1.2, 4.32, 5.88];
P2 = [-32.2, -43.3, -23.3];
P3 = [11, -12.2, -98.8];
N1 = Normalize(P2 - P1); % Normalized vector inside the plane
N2 = Normalize(P3 - P1);
N_Plane1 = Normalize(cross(N1, N2)); % Normal to plane 1
N_Plane2 = N1; % Normal to plane 2
N_Plane3 = Normalize(cross(N_Plane1, N_Plane2)); % And plane 3
function v = Normalize(v)
v = v / norm(v);
This is rather equivalent to Matt J's answer.

Matt J
Matt J on 8 Jan 2013
Edited: Matt J on 8 Jan 2013
Take 3 points in your initial plane: pt1,pt2,pt3. Then do
A=pt3-pt1;
B=pt2-pt1;
Normal1=cross(A,B); %normal to given plane
Normal2=cross(Normal1, A); %normal to first orthogonal plane
Normal3=cross(Normal1,Normal2); %normal to 2nd orthogonal plane

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!