Angle betwen an edge and a geodesic line, which are both members of the same mesh?
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Roger Stafford
am 24 Jun. 2013
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.
Kategorien
Mehr zu Geometric Geodesy finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!