3 ms·
> You can construct the orthonormal vector by taking the cross product between our first bond, and an arbitrary unit vector. Arbitrary not gonna work. The cros
by Const-me 4y ago
> You can construct the orthonormal vector by taking the cross product between our first bond, and an arbitrary unit vector.
Arbitrary not gonna work. The cross product will sometimes be zero vector, and the algorithm will fail. The cross product will sometimes be a vector of very small length, not long enough to give accurate direction, and the algorithm will glitch.
One reliable way is finding index of the smallest absolute coordinate of the input vector, and using that unit vector.
Another minor thing, I think most libraries are storing these 4 numbers in xyzw order, while this article uses wxyz order for the formulae.