0% found this document useful (0 votes)
74 views7 pages

Unit - 5 Three Dimensional Transformations Three-Dimensional Display Methods

Three dimensional transformations allow objects in a 3D scene to be manipulated and displayed. There are several types of 3D transformations including translation, rotation, scaling, reflection, and shear. Translation moves an object along an axis by adding offsets. Rotation rotates the object around an axis using transformation matrices. Scaling enlarges or shrinks the object uniformly or non-uniformly. Reflection mirrors the object across a plane. Shear skews the object by altering coordinates proportional to another coordinate.

Uploaded by

princeji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views7 pages

Unit - 5 Three Dimensional Transformations Three-Dimensional Display Methods

Three dimensional transformations allow objects in a 3D scene to be manipulated and displayed. There are several types of 3D transformations including translation, rotation, scaling, reflection, and shear. Translation moves an object along an axis by adding offsets. Rotation rotates the object around an axis using transformation matrices. Scaling enlarges or shrinks the object uniformly or non-uniformly. Reflection mirrors the object across a plane. Shear skews the object by altering coordinates proportional to another coordinate.

Uploaded by

princeji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT 5 THREE DIMENSIONAL TRANSFORMATIONS

Three-Dimensional Display Methods:


To obtain a display of a three-dimensional scene that has been modeled in
world coordinates. We must first set up a coordinate reference for the "camera".
This coordinate reference defines the position and orientation for the plane of the
camera from the below fig: we want to display a view of the objects in the scene.
Object descriptions are then transferred to the camera reference coordinates and
projected onto the selected display plane. Display methods are:
Parallel Projection
Perspective Projection
Depth Cueing
Visible Line and Surface Identification
Surface Rendering
Parallel Projection:
This method is used to generate the view of a solid object. It projects the
points of the object surface along parallel lines on to the display plane. By selecting
different viewing positions, we can project visible points of the object onto the
display plane to obtain different two-dimensional views of the object, as in Fig. In a
parallel projection, parallel lines in the world-coordinate scene projected into
parallel lines on the two-dimensional display plane. This technique is used in
engineering and architectural drawings to represent an object with a set of views
that maintain relative proportions of the object.

Perspective Projection:
Another method for generating a view of a three-dimensional scene is to
project points to the display plane along converging paths. This causes objects
farther from the viewing position to be displayed smaller than objects of the same
size that are nearer to the viewing position. In a perspective projection, parallel lines
in a scene that are not parallel to the display plane are projected into converging
lines. Scenes displayed using perspective projections appear more realistic, since
this is the way that our eyes and a camera lens form images. Parallel lines appear to
converge to a distant point in the background, and distant objects appear smaller
than objects closer to the viewing position.
Depth Cueing:
There are several ways in which we can include depth information in the twodimensional representation of solid objects. A simple method for indicating depth
with wireframe displays is to vary the intensity of objects according to their distance
from the viewing position. Figure shows a wireframe object displayed with depth
cueing. The lines closest to the viewing position are displayed with the highest
intensities, and lines farther away are displayed with decreasing intensities. Depth
cueing is applied by choosing maximum and minimum intensity (or color) values
and a range of distances over which the intensities are to vary.

Another application of depth cueing is modeling the effect of the atmosphere


on the perceived intensity of objects. More distant objects appear dimmer to us
than nearer objects due to light scattering by dust particles, haze, and smoke. Some
atmospheric effects can change the perceived color of an object, and we can model
these effects with depth cueing.

Visible Line and Surface Identification:


We can also clarify depth relationships in a wireframe display by
identifying visible lines in some way. The simplest method is to highlight the visible
lines or to display them in a different color. Another technique, commonly used for
engineering drawings, is to display the nonvisible lines as dashed lines. Another
approach is to simply remove the nonvisible lines, as in Figure (b) and (c) but
removing the hidden lines also removes information about the shape of the back
surfaces of an object. These visible-line methods also identify the visible surfaces of
objects.

When objects are to be displayed with color or shaded surfaces, we apply


surface-rendering procedures to the visible surfaces so that the hidden surfaces are
obscured. Some visible-surface algorithms establish visibility pixel by pixel across
the viewing plane; other algorithms determine visibility for object surfaces as a
whole.
Surface Rendering:
Added realism is attained in displays by setting the surface intensity of
objects according to the lighting conditions in the scene and according to assigned
surface characteristics. Lighting specifications include the intensity and positions of
light sources and the general background illumination required for a scene. Surface
properties of object include degree of transparency and how rough or smooth the
surfaces are to be. Procedures can then be applied to generate the correct
illumination and shadow regions for the scene. Surface-rendering methods are
combined with perspective and visible-surface identification to generate a degree of
realism in a displayed scene.

3D Transform:
Similar to the 2D transform: 3D transform has 3 basic transformations
Translation
Rotation
Scaling
Translation:
3D Translation is similar to the 2D translation. We used in 2D (x, y) to
homogeneous coordinates (x, y, 1).similar to this for 3D transform also: (x, y, z) to
homogeneous coordinates (x, y, z, 1).
From the below fig: point P (x, y, z) is translated to P (x, y, z) with the
matrix operation. Translation vector for the X, Y and Z axis respectively.

Opengl function for 3D translation:


glTranslate(

tx ,

ty ,

tz )

Rotation:
3D rotation is similar to 2D rotation. Two type of rotations are available.
Rotation based on coordinate axis
1. Rotation based on x-axis
2. Rotation based on y-axis
3. Rotation based on z-axis
Rotation based on reference line which parallel to coordinate axis
1. Rotation based on reference line parallel to the x-axis
2. Rotation based on reference line parallel to the y-axis
3. Rotation based on reference line parallel to the z-axis
Rotation based on reference line which is not parallel to coordinate axis
Rotation based on z-axis:
Equation for the 3D rotation based on z axis is:

Parameter
equation is:

specifies the rotation angle. Matrix representation for the above

Transformation equations for rotations about the other two coordinate axes
can be obtained with a cyclic permutation of the coordinate parameters x, y, and z.

x -> y -> z -> x


Rotation based on x-axis:
Equation for the 3D rotation based on x axis is:

Parameter
equation is:

specifies the rotation angle. Matrix representation for the above

Rotation based on y-axis:


Equation for the 3D rotation based on y axis is:

Parameter
equation is:

specifies the rotation angle. Matrix representation for the above

Rotation based on reference line which parallel to coordinate axis


Rotation based on reference line parallel to the x-axis:
In this special case: we can attain the desired rotation with the
following transformation equation is done by following 3 steps:
1. Translate the reference rotation axis to the parallel coordinate axis
2. Rotate about the axis
3. Translate the rotation axis is moved back to its original position
The below figures represents the above 3 step operations:

Rotation based on reference line which is not parallel to coordinate axis:


In this special case: we can attain the desired rotation with the following
transformation equation is done by following 4 steps:
1. Translate the rotation axis passes through the coordinate origin
2. Rotate the rotation axis and coincides with one of the coordinate axis
3. Rotate the object based on coordinate axis

4. Apply invers rotation to bring the rotation axis to its orientation


5. Apply inverse translation to bring the rotation axis back to its original position

Scaling:
This scaling is similar to the 2d scaling. Here first we will see the scaling
based on the origin. Position P = (x, y, z) is relative to the coordinate origin. Matrix
form is:

if (

Sx

x = x.

Sx

Sy

y = y.

Sy

Sz

z = z.

S z ) then the scaling is called uniform scaling

Scaling based on the fixed reference point:


In this case: scaling with respect to a selected fixed position (
be represented with the following sequence:
1. Translate the fixed point to the origin
2. Scale relative the origin
3. Translate the fixed point to the original position

x f , y f , z f ) can

Other Transformation:
Reflection:
3D reflection can be performed relative to the selected reflection axis.
Reflections with respect to the plane are equivalent to 180 degree rotation in
coordinate axis (xy, yz, zx).
Bellow the figure: its example for reflection based on xy plane:
For the below fig: This transform changes the sign of the z coordinates. Matrix
representation of the transform is below with sign change of z coordinate.

Shear:
This transform is used to modify the object shape. Similar to 2D: here also
possible to make the shear with respect to x, y and z axis. Here we will see the
shear based on the z axis:

Parameters a and b can be assigned any real values. The effect of this
transformation matrix is to alter x- and y-coordinate values by an amount that is
proportional to the z value, while leaving the z coordinate unchanged. Boundaries of
planes that are perpendicular to the z axis are thus shifted by an amount
proportional to z. An example of the effect of this shearing matrix on a unit
cube is shown in the above figure

You might also like