what is it to "normalize" a vector or a matirx

Started by
3 comments, last by oliii 19 years, 6 months ago
in many tutorials about matrices and vectors they are said to be "normalized" . what does this mean?
I currently only use c# and directX9, in case its relivant and i didnt mention it in the post
Advertisement
For vectors it means to make it so that it has a length of 1.

For matrices, I'd say it means that each axial vector of the rotation submatrix has a length of 1. Typically, you might want your matrix to me orthonormal, which would be that plus the component vectors being orthogonal.
A normalised vector lets you represent a direction without implying, or more importantly scaleing, any length. For example say you have many objects moving in the same direction but with different speeds. By multiplying the normalised direction vector with the objects speed for each object you can find their new positions after a unit of time has passed. However if the direction vector was not normalised, its length would scale the multiplication giving you distorted answers.
[size="1"] [size="4"]:: SHMUP-DEV ::
The "norm" of a vector is its magnitude. So, normalizing a vector means to give it a magnitude of 1. A vector with a norm of 1 is often called a direction, since it is a unit vector.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
'normalising' a matrix probably means 'ortho-normalising' a matrix, like an orientation matrix or rotation matrix.

3x3 matrices can be seen as 3 vectors loaded in either each rows or each columns of the matrix, depending if your maths uses row-major or column major.

Then normalising that matrix would be equivalent to having those vectors (each rows or each columns) to be of unit length, and each of the 3 vectors should be perpendicular to the two others, to avoid skewed matrices, which would graphically bend the rendering (objects would stretch in some direction or look really weird), and for physics, would basically screw up pretty much anything that uses the matrix.

Everything is better with Metal.

This topic is closed to new replies.

Advertisement