Angle betwen an edge and a geodesic line, which are both members of the same mesh?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (1)
Roger Stafford
il 24 Giu 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.
Categorie
Scopri di più su Geometric Geodesy in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!