Angle between two lines in frontal plane

2 ビュー (過去 30 日間)
Vahid Esmaeili
Vahid Esmaeili 2020 年 7 月 30 日
コメント済み: Vahid Esmaeili 2020 年 7 月 30 日
Hello,
Would you please assist me to find the angle between two points? The following lines are a part of an old program and I have to use it for my project.
In the frontal plane, there is comY (value of com on Y coordinate in fig1) and comZ ( value of com on Z coordinate in fig1 ) as well as COPY ( value of COP on Y coordinate in fig1 ) and COPZ ( value of COM on Z coordinate in fig1 ). The following lines calculate the slope between the two points
v_1Fro = [comZ,comY] - [COPZ,COPY];
slopeV_1Fron = (COPY - comY) ./ (COPZ - comZ);
The following lines calculate the slope between [COPY,COPZ] and another point which is perpendicular to this point [(COPY+100), COPZ]:
v_2Fron = [COPZ,(COPY+100)] - [COPZ,COPY];
slopeV_2Fron = (COPY - (COPY+100)) ./ (COPZ - COPZ);
This part: (COPZ - COPZ) does not work because it is always "0"! Is it normal and correct? As I am a beginner, I am not confident and I wanted to ask you as professionals to know your ideas.
The following calculates the angle between these slopes:
ThetaFron = atan(slopeV_1Fron) - atan(slopeV_2Fron);
Would you please confirm that the lines calculate the angle between two lines, as is shown in fig1? If no, please introduce me the best way.
Thank you so much.

採用された回答

Vladimir Sovkov
Vladimir Sovkov 2020 年 7 月 30 日
If, as it looks in the figure, (...Y) are the verticle coordinates and (...Z) are the horizontal coordinates, then the basic geometry is
  1 件のコメント
Vahid Esmaeili
Vahid Esmaeili 2020 年 7 月 30 日
Hi Vladimir,
Based on your suggestion, I modified the program and I compared the results with the results of a traditional method ( in the lab) that is not based on MATLAB. There are some differences between these two. I will spend more time on it to find out the reason(s).
Thank you so much,
Vahid,

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by