Unit Vector Math for 3D Graphics

Jed Margolin

I developed Unit Vector Math for 3D Graphics in 1978 in order to do a 3D space war game. 1978 was before the PC, the 68000, and the DSP.

In this geometric model there is an absolute Universe filled with Objects, each of which is free to rotate and translate. Associated with each Object is an Orthonormal Matrix (i.e. a set of Orthogonal Unit Vectors) that describes the Object's orientation with respect to the Universe. Because the Unit Vectors are Orthogonal, the Inverse of the matrix is simply its Transpose. This makes it very easy to change the point of reference. The Object may look at the Universe or the Universe may look at the Object. The Object may look at another Object after the appropriate concatenation of Unit Vectors. Each Object will always Roll, Pitch, or Yaw around its own axes regardless of its current orientation without using Euler angle functions.

When I went to Atari, a very stripped down version of the algorithms was used in BattleZone. The full version was used in Star Wars, Last Starfighter, TomCat, and Hard Drivin'/Race Drivin', as well as those games that used the Hard Drivin' hardware.

I am making this article available in several formats.

Each has advantages and disadvantages.

HTML - Good for viewing on-line

Can be difficult to save to disk because 
some browsers don't save the images. 

Not recommended for printing because it doesn't 
break the pages where I would like them to break.

Microsoft Word (277KB) - Good for saving and printing

If you do not have Microsoft Word, a free viewer is available 
from Microsoft (www.microsoft.com).

However, the current version of the viewer does not list Windows 98 
(or Windows 98SE) as one of the operating systems it will work with, 
thereby giving people another reason to upgrade to Windows XP 
and also to hate Microsoft.

PDF (1.1MB) - Easy to save and print

(The figures are not in color).

[This updated version has had the typos corrected (I hope). I now have a greater understanding of the consternation exhibited by my old college professors when the typos in their handouts were pointed out to them.]

Please send comments here