Perpendicular unit vectors

651 Views Asked by At

I have a known unit vector $p (a,b,c)$. First I want a unit vector $q$ which is perpendicular to $p$ and passing through a known point $V(X_0,Y_0,Z_0)$. Then a another unit vector $r$ which perpendicular to both $p$ and $q$ vectors. $p,q,r$ must be in clockwise direction. I have drawn this in a picture. Thanks in advance.

enter image description here

1

There are 1 best solutions below

2
On

You need a vector normal to the given unit vector $p=(a,b,c)$ [based at the origin - if you need another base like your $v=(x_0,y_0,z_0)$ then these coordinates may be added at the end]. There doesn't appear to be a single way to do this without cases. One way is to consider whether $a=0$. If $a=0$ so that $p=(0,b,c)$ then a normal to $p$ is $(0,c,-b)$, while if $a \neq 0$ then a normal to $p$ is $(b+c,-a,-a)$. Note that this last one could also work when $a=0$, as long as it happened that $b+c \neq 0$, but that again would be another case.

So the above describes how to get a vector $Q$ normal to $p$, then you can make that a unit vector $q$ by dividing through by its length. Finally for $r$ you can use $p \times q$ (cross product), and then $r$ will automatically be a unit vector perpendicular to both of $p,q$ and making a right-hand coordinate system with them.