10
Nov
Black Art of Java Game Programming by Joel
What makes this transform different from the others we have examined is that it cannot be expressed with a matrix operation. at least not completely. The reason for this is that it is not a linear transform. The projection of 3D points to a two-dimensional plane can be theoretically done from an arbitrary angle and position, but it is most effectively done when the vertices are in the VCS. This is one of the few reasons that we do the WCS to VCS transformation. The 3D coordinates are projected on a two-dimensional plane called the view plane, which in our case is the screen shown in Figure 11-18. The coordinate system that defines the screen is called the screen coordinate system (SCS), shown in Figure 11-19. Figure 11-18 Projection of a 3D coordinate on a view plane Figure 11-19 The screen coordinate system (SCS) The amount of perspective depends on the distance of the view plane from the origin of the VCS. The smaller the distance, the more exaggerated the perspective, because the distance indirectly determines the view angle. Beyond a certain value, the projection will be so exaggerated that the objects will be distorted. The math behind perspective projection is based on Figure 11-20 which gives us the following equation: Figure 11-20 The projection can be calculated using triangles Notice that Z is negative. If it weren t, then the projection would be mirrored along the z-axis. All this
Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Virtualwebstudio j2ee web hosting services
