W!? Where did that come from?
Practical answer:
- W is a clever algebraic trick.
- Don’t worry about it too much. The w value will be 1.0 for the time being.
- If w is not 1.0, divide all coordinates by w to make it so.
Clever Academic Answer:
- (x,y,w) coordinates form a 3D projective space.
- All nonzero scalar multiples of (x,y,1) form an equivalence class of points that project to the same 2D Cartesian point (x,y).
- For 3-D graphics, the 4D projective space point (x,y,z,w) maps to the 3D point (x,y,z) in the same way.
- w=0 yields “points at infinity” which are equivalent to directions.
- Projective space lets you do a variety of clever things (for example, rational spline curves).