## For a graphics programmer the real challenge is to image a 3D object in a 2D display plane with realistic effect. It is the third dimension or depth of objects that needs to be handled properly to produce the desired effect. This is achieved by a suitable combination of 3D geometric transformation and 3D viewing transformation where projection plays the key role.

3D geometric transformation is just an extension of the 2D transformation. Though the basic transformation mathematics is easily understandable the important aspect in 3D transformation is proper visualization of object movement in space. Even the object may remain stationary and the viewer’s point of view might change.

All these factors taken together 3D graphics packages are developed that models real-life 3D objects and allow the user to move, resize or reorient them or even dynamically updates the object’s views while simulating users movement within the scene. This unit addresses the cases and mathematics behind the transformation of geometry and projected views of objects from a 3D perspective.

## 3D GRAPHICS

In the previous unit we confined our discussion to two-dimensional (zero thickness) graphic objects only. The present unit is an extension of the previous one in the sense that it now takes z coordinates into consideration apart from the x, y and homogeneous coordinates while the basic approach for representing and manipulating objects remains same. As done in case of 2D we express 3D object transformation in matrix form and any sequence of transformations is represented as a single matrix formed by concatenating the matrices for individual transformations in the same sequence. However, this chapter takes us closer to reality, because real objects are all three dimensional.

## ROTATION

We have seen that any 2D-rotation transformation is uniquely defined by specifying a centre of rotation and amount of angular rotation. But these two parameters do not uniquely define a rotation in 3D space because an object can rotate along different circular paths centering a given rotation centre and thus forming different planes of rotation. We need to fix the plane of rotation and that is done by specifying an axis of rotation instead of a centre of rotation. The radius of rotation-path is always perpendicular to the axis of rotation. Before considering three-dimensional rotation about an arbitrary axis we examine rotation about each of the coordinate axes. By convention positive rotation angles produce counter- clockwise rotations about a coordinate axis when looking from positive axis.

## PROJECTION

3D objects or scenes which are defined and manipulated using actual physical units of measurement in a 3D space, have to be transformed at one stage from a 3D representation to a 2D representation. Because the image is finally viewed on a 2D plane of the display device. Such 3D-to-2D transformation is called Projection . 2D projected images are formed by the intersection of lines called Projectors with a plane called the projection plane . Projectors are lines from an arbitrary point called the centre of projection through each point in an object.There are different categories of projection depending on the direction of projectors and also the relative position of the centre of projection and plane of projection.

## Parallel Projection

When the centre of projection is situated at an infinite distance such that the projectors are parallel to each other, the type of projection is called parallel projection . In parallel projection, image points are found at the intersection of the view plane with parallel projectors drawn from the object points in a fixed direction. Different parallel projection of the same object results on the same view plane for different direction of projectors.

## Orthographic Projection

Orthographic projection occurs when the direction of projection is perpendicular to the plane of projection

## Isometric projection

The direction of projection makes equal angles with all three principal axes.

## Dimetric projection

The direction of projection makes equal angles with exactly two of the principal axes.

## Trimetric projection

The direction of projection makes unequal angles with the three principal axes.

## GRAPHICS COORDINATE SYSTEMS AND VIEWING PIPELINE

Computer generation of a view of an object on a display device requires stage-wise transformation operations of the object definitions in different coordinate systems. We present here a non-mathematical introduction to each of these coordinate systems to help you develop an intuitive notion of their use and relationship to one another.

Global Coordinate System, also called the World Coordinate System  is the principal frame of reference in which all other coordinate systems are defined. This three-dimensional system is the basis for defining and locating in space all objects in a computer graphics scene, including the observer’s position and line of sight. All geometric transformations like translation, rotation, scaling, reflection etc. are carried out with reference to this global coordinate system.

A Local Coordinate System, or a Modeling Coordinate System is used to define the geometry of an object independently of the global system. This is done for the ease of defining the object-details w.r.t. reference point and axes on the object itself. Once you define the object ‘locally’, you can place it in the global system simply by specifying the location and orientation of the origin and axes of the local system within the global system, then mathematically transforming the point coordinates defining the object from the local to the global system.

## SUMMARY

In this unit we have learnt how computer graphics can be matured to implement models and effects closer to reality using 3D geometric and viewing transformations. Unlike two- dimensional viewing, 3D viewing requires clipping of the object against a 3D view volume followed by projection and finally mapping to a viewport for display. 3D geometric transformations, projection transformations and 3D clipping are interlinked as some cases of parallel or perspective transformation entail 3D rotations about coordinate axes. It is also illustrated in the projection mathematics how homogeneous coordinates can be effectively used to form composite transformation matrices arising from 3D geometric or viewing operations.