• entries
113
126
• views
63862

# Time to oil the cogs

140 views

I am at the end of chapter five of the Math primer book for 3D gaming. Time for the Linear Algebra exercises. A few of them are easy, but normalizing vectors takes a little getting used to. It is a simple formula, I am just a little rusty right now.

I loved Math in high school, but that was years ago...

lol, I hated math in high school. I never appreciated how powerful and useful it is until I started learning game dev. I felt there was no purpose in high school as far as math goes. Game dev gives me a purpose.

Normalizing vectors isn't too bad; you're just making them unit length (1).

So, if the normalized vector is N, and the non-normalized vector is n, you want:
N = normalize(n), |N| = 1, |n| = length,
Since you want to preserve the original direction of the vector, you'll need to scale each element of n by the same amount.
So, |n|/x = 1, N = n/x
Trivially, we have x = length = |n|

When I was learning linear algebra, I found it a lot easier to remember things if you really think about why you are doing something, instead of just memorizing the formulas.