Given three unit vectors A, B, C, how do I compute the dihedral angle from A to B about C?

50 Views Asked by At

I have three 3D (Cartesian space) unit vectors that are the vertices of a spherical triangle. How do I compute the rotation angle from A to B about C? Or, put another way, the angle of the spherical triangle at vertex C?

1

There are 1 best solutions below

0
On

If you want to compute the planar angle: $$ \cos(\angle ACB)={(A-C)\cdot(B-C)\over|A-C|\ |B-C|}, $$ where "$\cdot$" represents the dot product.

If you want the spherical angle, then this is the angle between two vectors perpendicular to $C$ and lying in planes $COA$ and $BOA$ (where $O$ is the center of the sphere. Two such vectors are, for instance: $$ \vec u =(C\times A)\times C,\quad \vec v =(C\times B)\times C. $$ Spherical angle $\theta$ is then given by $$ \cos\theta={\vec u\cdot\vec v\over|\vec u|\ |\vec v|}. $$