Given a vector $\vec{v} = (x, y, z)$, how do I find two vectors that make up an axis with $\vec{v}$? In other words, one of them is perpendicular and lies in the same plane and the other is normal to those two vectors.
Finding two more vectors to make up an axis
5
$\begingroup$
linear-algebra
-
0For what it's worth, the phrase "lies in the same plane" in your question is redundant. *Any* vector lies in the same plane as another vector... It takes two vectors to determine a plane. – 2012-12-18
2 Answers
7
If you just want to take your ${\bf v}$ and produce an orthogonal basis including ${\bf v}$, then take ${\bf w}={\bf A}\times {\bf v}$ with an arbitrary vector ${\bf A}$ not parallel to ${\bf v}$. Then ${\bf v}\cdot{\bf w}=0$. Next, take ${\bf x}={\bf v}\times {\bf w}$ and $\{{\bf v},{\bf w},{\bf x}\}$ is a set of vectors to your specifications. There is a lot of flexibility here, so you might want to think hard about what you really want... because it's probably not what you asked for.
-
0You're right, there is a infinite number of axis... there is no solution for what I have asked, i need to maintain the state of the initial 3 vectors that make up the original axis (1,0,0), (0,1,0), (0,0,1). The thing is, i can set the position of the object i want to manipulate at any time, and i lose track of the state... – 2012-12-17
3
You can use for example $(x,y,z)$,$(y,-x,0)$ and $(xz,yz,-x^2-y^2)$. In general, to find the second vector, use one which has dot product zero when taken with the first vector, and then take the cross product of the first two vectors to find the third.