Direction of cross product between two vectors when theta>pi

666 Views Asked by At

I have two 3D vectors, v1 and v2, that lay in the same plane in a 3D space. When calculating the cross product between them to find the normal to the plane, the right-hand rule applies for the direction of the resulting vector in the range of theta = 0...pi (considering that the angle is always counter-clockwise). However, when the angle between the two vectors is theta > pi, the direction swaps. This is a problem when I don't know the angle, and calculating the angle is not trivial. How can I prevent this, or fix the direction of the cross product for the whole range 0...2pi?

1

There are 1 best solutions below

3
On

The right-hand rule still applies to $[-\pi,0]$ as well, if you interpret the angle between $\pi$ and $2\pi$ instead as an angle between $-\pi$ and $0$.

Maybe you should be content with the range $[-\pi,\pi]$ instead.