Sunday, August 19, 2012

Useful 3D Game Maths Equations

Calculating the Magnitude of a vector:


where:
v = vector
n = distance


Vector multiplication by scalar

Normalized Vectors


Vector Adding and Subtracting

Distance from one vector to another


Vector Dot Product


The dot product of two vectors is the sum of the products of corresponding components. This
results in a scalar:




Generally speaking, the dot product in any dimension tells how “similar” two vectors are; the
larger the dot product, the more similar the two vectors. Geometrically, we can be more precise


Projecting one vector onto another



Vector Cross Product

The other vector product, known as the cross product or outer product, applies to 3D vectors only.
Unlike the dot product, which yields a scalar and is commutative, the vector cross product yields a
3D vector and is not commutative.


Like the dot product, the term “cross product” comes from the symbol used in the notation: a×b.
We always write the cross symbol, rather than omitting it like we do with scalar multiplication.
The equation for the cross product is given by:





Complete list of linear algebra identities



No comments:

Post a Comment