Cross Product
The cross product is a special operation only serving a purpose in 3D.
We are mainly going to use the cross product to construct vectors which are linear independent from another. Other than that it's not too useful for our purposes. Take this example where we have 2 (linear independent) vectors and use the cross product to construct a 3rd vector which all together form a new coordinate system.

Note that this animation also uses vector projection, which is not explained here.
Vector orangeVector = new Vector(3, 0, 1).normalize();
Vector tealVector = new Vector(-0.5, 2, 1).normalize();
Vector purpleVector = orangeVector.getCrossProduct(tealVector);
Last updated