by pat » Mon Oct 02, 2006 7:27 pm
A perspective projection from 3D to 2D typically goes like this:
* (x,y,z) -> (x,y)/(a+z) = (x/(a+z), y/(a+z))
Doing this same thing from 4D down to 2D in two steps would be:
* (x,y,z,w) -> (x,y,z)/(a + w) -> (x,y)/( (a+w)(b+z) )
For my crot applet, IIRC, I did this instead:
* (x,y,z,w) -> (x,y,z)/(a + bw) -> (x,y)/( (a+bw)(c+z) )
I have, in the past, done this:
* (x,y,z,w) -> (x,y)/(a + bw + z)
The b is there so just so that (0,0,1,0) and (0,0,0,1) don't project to the same place.
In my new applet, I'm going to be allowing much more flexibility in the projection. But, I can't promise that applet this week.