You are on page 1of 2

Projections

1. Why projections? In two-dimensional graphics applications, viewing operations transfer positions from the world-coordinate plane to pixel positions in the plane of the output device. Given a 3D object or scene, we are required to show the scene on a 2D computer screen. The object to be displayed needs to be done so w.r.t a projection plane. 1.1 Specifying the View Plane: We choose a particular view for a scene by first establishing the viewing-coordinate system, also called the view reference coordinate system. A view plane, or projection plane, is then set up perpendicular to the viewing axis as shown below:

Fig 1: The viewing plane The world coordinated are transformed to the view coordinates & view coordinates are projected onto the view plane. To establish the viewing coordinate reference frame, we first pick a world coordinate position called the view reference point. This point is the origin of our viewing-coordinate system. The view reference point is often chosen to be close to or on the surface of some object in a scene. But we could also choose a point that is at the center of an object, or at the center of a group of objects, or somewhere out in front of the scene to be displayed 1.2 Choosing the normal vector ( ): Choosing the direction of N, establishes the positive direction of the view plane. Then a viewing vector(V) is defined along the positive y direction as shown:

Figure 2: The vector V & its adjusted position We can choose the view up vector V to be in any convenient direction as long as it is not parallel to N. 1.3 Computing the third vector(U): Using the vectors V & N, third vector U can be computed perpendicular to both V & N. 2. Transformation from world to viewing coordinates:

It involves two steps: 2.1 Translate the view reference point to the origin of the world-coordinate system. 2.2 Apply rotations to align the , , and ,. axes with the world , , and , axes respectively. The sequence of operations are as follows: If the view reference point is specified at world position ( , , this point is translated to the world origin with the matrix transformation:

The rotation sequence can require up to three coordinate-axis rotations, depending on the direction we choose for N. In general, if N is not aligned with any world-coordinate axis, we can superimpose the viewing and world systems with the transformation sequence i.e. we first rotate around the world , axis to bring into the plane. Then, we rotate around the world , axis to align the and axes. The final rotation is about the axis to align the and axes. 2.3 Another method for generating the rotation-transformation matrix is to calculate unit uvn vectors and form the composite rotation matrix directly, as | | | | ( (

( Thus, the composite rotation matrix is given by: [ ]

The complete world-to-viewing coordinate transformation matrix is obtained as the matrix product

This transformation is then applied to coordinate descriptions of objects in the scene to transfer them to the viewing reference frame.

You might also like