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에서 Geometric Geodesy에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!