views:

36

answers:

1

I'm just starting out with 3D math/programming and I have a question about point normalization:

When doing transformations such as rotations, scaling, camera and perspective projections should I always normalize points so that w is 1 between transformations, or is it better to leave it until I'm ready to display them? Is there any reason not to, other than performance?

Thanks,

Jason

+1  A: 

Normally, you don't apply a series of linear transformations to vectors. You apply one: the composition of all the linear transformations you'd like to apply (including model and camera transformations) and you do this right before displaying the point.

It doesn't matter anyway, because none of the standard transformations affect w anyway. I mean, there isn't even any rounding error, w will always be 1.

Dietrich Epp
So, is it fair to say that P is equivalent to N(P)? At least for transformation and projection? (pardon the pun)
Jason Hernandez
No. Only the w component stays the same. A more accurate formula would be E_w T = T E_w = E_w for all transformations T, where E_w is the orthogonal projection onto span{w}.
Dietrich Epp
Six Months later... that all makes sense. thx.
Jason Hernandez