UnitIII CG

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

VIEW VOLUMES AND GENERAL PROIECTION TRANSFORMATIONS

• In the camera analogy, the type of lens used on the camera is one factor that
determines how much of the scene 1s caught on film.
• A wide angle lens takes in more of the scene than a regular lens. In three-dimensional
viewing, a rectangular view window, or projection window, in the view plane is
used to the same effect.
• Edges of the view window are parallel to the xv,yv, axes, and the window boundary
positions are specified in vieweing coordinates, as shown in Fig. 12-27. The view
window can be placed anywhere on the view plane.

Given the specification of the view window, we can set up a view volume usine the window
boundaries. Onlv those obiects within the view volume will " appear in the generated display
on an output device; all others are clipped from the display.
The size of the view volume depends on the size of the window, while the shape of the view
volume depends on the type of projection to be used to generate the display.
In any case, four sides of the volume are planes that pass through the edges of the window.
For a parallel projection, these four sides of the view volume form an infinite parallelepiped,
as in Fig. 12-28.
For a perspective projection, the view volume is-a with apex at the projection reference point
(Rg. 12-29).

A finite view volume is obtained by limiting the extent of the volume in the Zi direction. This
is done by specifying positions or one or two additional boundary planes.
These z,-boundary planes are referred to as the front plane and back plane, or the near plane
and the far plane, of the viewing volume.
The front and back planes are parallel to the view plane at specified-positions zfront and zback
Both planes must be on the same side of the projection reference point, and the back plane
must be farther from the projection point than the front plane.
Including the front and back planes produces a view volume bounded by six planes, as shown
in Fig. 12-30.
General Parallel-Projection Transformations

Figure 12-36 shows the general shape of a finite view volume for a given projection vector
and projection window in the view plane. We obtain the oblique projection transformation
with a shear operation that converts the view volume in Fig. 12-36 to the regular
parallelepiped shown in Fig. 12-37. The elements of the shearing transformation needed to
generate the view volume shown in Fig. 12-37 are obtained by considering the shear
transformation of the projection vector. If the projection vector is specified in world
coordinates, it must first be transformed to viewing coordinates using the rotation matrix.
CLIPPING

To clip a line segment against the view volume, we must ascertain the relative position of the
line by evaluating the view volume's boundary plane equations.
This involves substituting the endpoint coordinates of the line into each boundary's plane
equation to determine if the endpoint lies inside or outside the boundary.
An endpoint (x, y, z) is considered outside a boundary plane if Ax + By + Cz + D > 0, where
A, B, C, and D represent the plane parameters.
Conversely, the endpoint is inside the boundary if Ax + By + Cz + D < 0. Lines with both
endpoints outside a boundary plane are discarded, while those with both endpoints inside all
boundary planes are retained.
To find the intersection of a line with a boundary, the line equations are employed in
conjunction with the plane equation. The intersection coordinates (x_i, y_i, z_i) represent
values that lie on the line and satisfy the plane equation Ax_i + By_i + Cz_i + D = 0.
HARDWARE IMPLEMENTATIONS

Most graphics processes are currently executed in hardware.


Usually, the viewing, visible-surface identification, and shading algorithms are integrated into
graphics chipsets, utilizing VLSI (very large-scale integration) circuitry techniques.
Modern hardware systems are specifically engineered to perform transformations, clipping,
and projection of objects onto the output device, catering to both three-dimensional and
two-dimensional applications.

● Chips organized into a pipeline for geometric transformations, coordinate system


transformations, projections, and clipping
● Initial four chips dedicated to basic operations: scaling, translation, rotation, and
world-to-projection coordinate conversions
● Following six chips perform clipping against viewport boundaries, with four utilized
in two-dimensional applications and two for three-dimensional viewport clipping
against front and back planes
● Last two chips convert viewport coordinates to output device coordinates
● Additional components can be added for visible-surface identification and
surface-shading algorithms to create a comprehensive three-dimensional graphics
system
THREE-DIMENSIONAL VIEWING FUNCTIONS

• Three-dimensional graphics library typically offers procedures for setting viewing


transformation parameters
• Various methods exist for organizing these procedures
• Introduction of PHIGS functions for three-dimensional viewing
• Parameters specified in world coordinates

evaluateViewOrientationHatrix3 (xO, yo,z0, xN, yN, zN, xv, yv, zV, error. viewllatrix)

You might also like