Find Angle using point coordinates?

9 ビュー (過去 30 日間)
Arnab Nandi
Arnab Nandi 2022 年 1 月 6 日
コメント済み: Bjorn Gustavsson 2022 年 1 月 6 日
I want to find angle a using point 1 2 3 and angle b using point 4 2 3. I want angle a to be negative value and angle b as a positive value?

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2022 年 1 月 6 日
You could use the general formulas for angle between vectors found here: angle-between-two-vectors-in-3d, which is a good answer. If you desperately need the angles relative to the points 2 and 3 pair you will have to do some elementary linear algebra and rotate your coordinate system such that the x-axis lines up with the direction between them. From there you should be able to figure out how to use atan2 to get the angles you request. As usual it is very helpful to sketch the graphics of the steps on paper to get a clear image of what's done.
HTH

その他の回答 (1 件)

Arnab Nandi
Arnab Nandi 2022 年 1 月 6 日
Thanks.
  1 件のコメント
Bjorn Gustavsson
Bjorn Gustavsson 2022 年 1 月 6 日
Happy it helped.

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

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by