Posted 14 February 2011 - 06:07 AM
I have the following doubts and hope to have them cleared:
1. Why do we need homogeneous coordinates?
2. I also read that, points in the projective space are expressed in homogeneous coordinates (REF: Image Processing Analysis and Machine Vision. By, Milan Sonka, Vaclav Hlavac, Roger Boyle). Why can't we represent the points using the same Cartesian coordinates?
If there is/are any error(s) in the questions, I apologize. Please consider my case sympathetically.
Posted 14 February 2011 - 07:47 AM
For perpective projections, you need to be able to divide. For a point in view space, the projected point on a 2d screen can be calculated by dividing x and y by z. This is an operation that is not possible with matrices. However, using the properties of homogeneous coordinates, the division by z can be achieved simply by copying 'z' to 'w' using a 4x4 transformation matrix.
Note that while mathematically homogeneous coordinates are very well-defined, in computer graphics we merely use them as a convenience to be able specify the calculations that we need. Most computer graphics applications will never use homogeneous coordinates to their full extent. Before perspectice transformation, 'w' will always equal 1, and the only place where an actual division by w takes place is when projecting the points on a 2D surface before rendering. No one cares about the property that (1, 2, 3, 1) and (2, 4, 6, 2) are essentially the same point. In fact, having w=2 will break most code as they simply assume that w=1, and it may not even be possible to explicitely store a w component.
Currently working on: the 3D engine for Tomb Raider.
Posted 14 February 2011 - 10:44 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users