필터 지우기
필터 지우기

3D system definition: How btaining the angle between a single axis and a plane

조회 수: 3 (최근 30일)
Hello, I am having trouble obtaining the angle between a vector and a plane which are defined by two different rotation matrix.
I have two objects, A and B, which are defined by rotation matrices R (Rotation matrix from global origin to A) and R' (Rotation matrix from global origin to B).
R = [a b c; d e f; g h i]
R'= [a' b' c'; d' e' f'; g' h' i']
I want to obtain the rotation in degrees between the axis X from object A to the plane XZ (and eventually XY) from object B.
Thank you in advance.
Alonso

채택된 답변

Matt J
Matt J 2024년 8월 1일
and eventually XY
That would just be the angle between Yprime and Z, wouldn't it?
Yprime=Rprime(:,2);
Z=R(:,3);
angle = acosd( dot(Yprime,Z)/norm(Yprime)/norm(Z) )
  댓글 수: 3
Matt J
Matt J 2024년 8월 1일
편집: Matt J 2024년 8월 1일
Same sort of thing...
X=R(:,1);
Yprime=Rprime(:,2);
Zprime=Rprime(:,3);
angle1 = 90-acosd( dot(Yprime,X)/norm(Yprime)/norm(X) ) %Angle with plane X'Z'
angle2 = 90-acosd( dot(Zprime,X)/norm(Zprime)/norm(X) ) %Angle with plane X'Y'

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulation and Analysis에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by