필터 지우기
필터 지우기

Calculate the angle between plane normal and a point it cuts

조회 수: 2 (최근 30일)
HB
HB 2019년 10월 9일
편집: James Tursa 2019년 10월 9일
I am trying to write a script that will calculate the angle between two 3D vectors. Specifically I have a plane cutting through a model where the centre of the plane cuts a point along the centreline of the model as shown in the attached image. One 3D vector is the plane normal e.g [0.21 0.98 0], the other 3D vector is the position of the point it cuts e.g [4.05 5.35 3.96]. By having this angle I will be able to adjust the plane to be perpendicular to the inlet of the model!
Any suggestions on how to achieve this are welcome!
Thanks
  댓글 수: 1
James Tursa
James Tursa 2019년 10월 9일
편집: James Tursa 2019년 10월 9일
How can you determine the angle of the plane to the inlet by just knowing the centerline point of the inlet that it intersects? Seems like you need another point or something to give the direction of the inlet. Then you can find the angle between these vectors.

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

답변 (1개)

Fabio Freschi
Fabio Freschi 2019년 10월 9일
using the definition of dot product:
% angle function in radians
ang = @(u,v)acos(dot(u,v)/(norm(u)*norm(v)));
% data
u = [0.21 0.98 0];
v = [4.05 5.35 3.96];
% calculation
myangle = ang(u,v)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by