Let $a\in\mathbb R^3\setminus\left\{0\right\}$. I'm a bit rusty at this basic geometry stuff, so please bear with me. I want to find an orthonormal basis $(u,v,w)$ of $\mathbb R$ such that $a/|a|$ has coordinates $(0,0,1)$. Gram-Schmidt will do the job, I know, but I want to construct $(u,v,w)$ such that it forms a (i) right-handed and (ii) left-handed system.
We clearly need $w:=a/|a|$. Now I guess we may pick any $b\in\mathbb R$ which is not parallel to $w$ (my idea is to let $i:=\operatorname{arg min}_j|w_j|$ and $b:=e_i$ ($i$th standard unit vector; is this a good idea or are there any issues?) and let $$u:=\frac{b\times w}{|b\times w|}.$$ $u$ is obviously perpendicular to $u$, but we could likewise taken $$\tilde u:=\frac{w\times b}{|w\times b|}=-u.$$
Does it matter whether we pick $u$ or $\tilde u$? I think it shouldn't and I think that the handedness now depends only on the choice of $v$. So, do we need to choose $w\times u$ or $u\times w$ (or $w\times\tilde u$ or $w\times\tilde u$)?