Angle betwen an edge and a geodesic line, which are both members of the same mesh?
古いコメントを表示
Hi there,
The coordinates of all three vertices are of course known. I have Boost libraray installed but I'm unaware of such function. Any suggestions?
採用された回答
その他の回答 (1 件)
Roger Stafford
2013 年 6 月 24 日
If the three vertices you refer to are column vector vertices, P1, P2, and P3, of a triangle, and you want to find the inner angle at P1, do this:
a = atan2(norm(cross(P2-P1,P3-P1)),dot(P2-P1,P3-P1));
or if you are in two-dimensional space
a = atan2(abs(det([P2-P1,P3-P1])),dot(P2-P1,P3-P1));
The angle is returned in radians ranging from 0 to pi.
カテゴリ
ヘルプ センター および File Exchange で Triangulations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!