Given a point $P_O$ and a normal $\vec n$ I need two vectors $v_1, v_2$ that parametrically describe the same plane such that $v_1 \cdot v_2 = 0$ and $|v_1|=|v_2|=1$.
Is there an algorithm to do this?
Given a point $P_O$ and a normal $\vec n$ I need two vectors $v_1, v_2$ that parametrically describe the same plane such that $v_1 \cdot v_2 = 0$ and $|v_1|=|v_2|=1$.
Is there an algorithm to do this?
On
The algorithm I know is call the Gram-Schmidt Process. The idea is to take one vector, in this case your normal vector and take some other vector and subtract the orthogonal projection onto the subspace spanned by the first vector to give you a vector orthogonal to that subspace. Then repeat this process by projecting another linearly independent vector onto the plane spanned by these two vectors and subtracting that one off from the third vector to the same effect. Repeat until you're out of linearly independent vectors.
Find any vector orthogonal to $n$ and divide it by its module. This will be $v_1$. Then $v_2=n\times v_1$.