Game Development Reference
In-Depth Information
Figure 8.10
Normalizing a vector.
Imagine a two-dimensional vector with an X and Y element. Up, down, left, and
right vectors can be created with [0, 1], [0,
1, 0], and [1, 0]. This creates a
cross-like shape. If you now created four more normal vectors between these up,
down, left, and right vectors you would start to approximate a circle. This is the
unit circle; it has a radius of 1. The unit circle can be seen in Figure 8.11. If a
three-element vector [X, Y, Z] is used, then a unit sphere is created. If you had all
vectors of length 2, then you would have a sphere with a radius of 2 and so on.
1], [
Figure 8.11
Unit circle.
 
 
Search WWH ::




Custom Search