필터 지우기
필터 지우기

Angle between a plane and horizontal

조회 수: 9 (최근 30일)
bes
bes 2012년 8월 9일
I need to find the angle between a set of planes ax+by+cz+d = 0 and horizontal plane (x-y plane).
For example my first plane equation is x - 4y +3z +1 = 0 so i wrote the following code
n1 = [1 -4 3]; % Normal vector to plane
n2= [0 0 1]; % normal vector to x-y plane
cosang = dot(n1,n2); % actually n1.n2 = |n1||n2|cosang
n1crossn2 = cross(n1,n2);
sinang = norm(n1crossn2); % actually n1*n2 = |n1||n2|sinang n
angle = atand(sinang, cosang);
it gives an answer 53.96
I thought the angle between plane and horizontal is same as the angle between normal to both plane. Is it true? I don't know how to verify this? Also how can i check the sign of the angle(possitive or negative)?
Is there any other way to get the angle between given plane and horizontal plane? Note: I don't know the coordinates of any plane lying on that plane. I only know the plane equation

채택된 답변

Honglei Chen
Honglei Chen 2012년 8월 9일
The angle between the two planes are the angle between the two normal vectors, so your approach is correct. I'm not sure why you need to do atand though. I think once you do the dot product, you can use acosd directily
  댓글 수: 1
bes
bes 2012년 8월 9일
Thanks. Ya . i have corrected as angle = acosd((cosang / norm(n1)*norm(n2)));

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cartesian Coordinate System Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by