Angle between two planes given xyz coordinate data from each plane
3 views (last 30 days)
Show older comments
Gabriella Sandberg
on 8 Sep 2022
Commented: Gabriella Sandberg
on 9 Sep 2022
I have 4 points in one plane and 3 points on another plane. How do I use this data to calculate the angle between the two planes generated by the xyz coordinates? Here is what I have tried so far, but I don't get a number as an answer. Any help would be appreciated!
%Proximal Plane
P1 = [1,-1,3];
P2 = [2,3,4];
P3 = [-5,6,7];
normal = cross(P1-P2, P1-P3);
syms x y z
P_p = [x,y,z]
realdot = @(u, v) u*transpose(v);
planefunction = realdot(normal, P_p-P1);
%Distal Plane
P4 = [4,-2,4];
P5 = [1,7,5];
P6 = [-3,5,9];
normal2 = cross(P4-P5, P4-P6);
syms x1 y1 z1
P_d = [x1,y1,z1]
realdot = @(u, v) u*transpose(v);
planefunction2 = realdot(normal2, P_d-P4);
angle = acosd((realdot(P_p,P_d)/norm(P_p)*norm(P_d)))
0 Comments
Accepted Answer
David Hill
on 8 Sep 2022
P1 = [1,-1,3];
P2 = [2,3,4];
P3 = [-5,6,7];
normal = cross(P1-P2, P1-P3);
P4 = [4,-2,4];
P5 = [1,7,5];
P6 = [-3,5,9];
normal2 = cross(P4-P5, P4-P6);
Angle=acosd(abs(sum(normal.*normal2))/norm(normal)/norm(normal2));
2 Comments
James Tursa
on 9 Sep 2022
Or
Angle = atan2(norm(cross(normal,normal2)),dot(normal,normal2));
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!