0% found this document useful (0 votes)
18 views8 pages

Computer Graphics: Semester 5

Uploaded by

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

Computer Graphics: Semester 5

Uploaded by

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

COMPUTER

GRAPHICS
SEMESTER 5
UNIT - 4

HI COLLEGE
SYLLABUS
UNIT - 4

HI COLLEGE
THREE DIMENSIONAL VIEWING

INTRODUCTION
Three-dimensional (3D) viewing is a technique used in computer graphics to
create the illusion of depth and spatial relationships between objects in a
virtual environment. This is achieved by projecting a 3D scene onto a 2D display,
such as a computer monitor or virtual reality headset.

To create a 3D image, the scene is first modeled using mathematical equations


that describe the shape and position of each object. These equations are then
used to calculate the perspective and shading of each object, based on its
position relative to the viewer and the light source.

REPRESENTATION OF THREE-DIMENSIONAL OBJECTS


In computer graphics, three-dimensional objects are represented using
mathematical equations that describe their shape and position in a 3D space.
These equations are typically based on geometric primitives such as points,
lines, and polygons.

Points: A point is a simple 3D location in space, represented by its x, y, and z


coordinates. Points are often used as the starting point for more complex
shapes, such as lines and polygons.

Lines: A line is a one-dimensional object that connects two points in space.


Lines are defined by their start and end points, and can be used to represent
edges or boundaries between objects.

Polygons: A polygon is a two-dimensional shape with three or more sides.


Polygons are defined by their vertices (corners) and can be used to represent
flat surfaces or faces of objects.

To create a 3D object, these primitives are combined into more complex shapes
using techniques such as extrusion, rotation, and scaling. For example, an
extruded polygon is created by extending its sides into a third dimension, while
a rotated polygon is created by rotating it around one or more axes.

HiCollege Click Here For More Notes 01


PROJECTIONS
Projections are techniques used in computer graphics to transform a 3D scene
into a 2D image that can be displayed on a screen. There are several types of
projections commonly used in computer graphics, each with its own
advantages and disadvantages:

1. Parallel projection: In parallel projection, the projection plane is


perpendicular to the viewer's line of sight. This results in a flat, rectangular
image that is easy to read and interpret. Parallel projection is commonly used in
architectural drawings and technical illustrations.

2. Perspective projection: In perspective projection, the projection plane is


tilted relative to the viewer's line of sight, creating a more realistic and
immersive image. Perspective projection makes objects appear smaller as they
move farther away, which helps to create a sense of depth and spatial
relationships. Perspective projection is commonly used in photography and 3D
modeling applications.

3. Cylindrical projection: In cylindrical projection, the projection plane is


wrapped around a cylinder, allowing for a more immersive and panoramic view
of the scene. Cylindrical projection is commonly used in virtual reality
applications and planetarium shows.

4. Stereographic projection: In stereographic projection, the projection plane is


curved, allowing for a more natural and immersive view of the scene from a
specific viewpoint. Stereographic projection is commonly used in scientific
illustrations and maps.

HiCollege Click Here For More Notes 02


PARALLEL PROJECTIONS:
ORTHOGRAPHIC PROJECTIONS & OBLIQUE PROJECTIONS.
Parallel projections are a type of projection used in computer graphics to transform a
3D scene into a 2D image. Parallel projections are also commonly used in technical
drawing, architecture, and engineering. There are two main types of parallel
projections: orthographic projections and oblique projections.

1. ORTHOGRAPHIC PROJECTIONS:
Orthographic projections are parallel projections in which the projection plane is
perpendicular to the viewer's line of sight. This results in a flat, rectangular image that
is easy to read and interpret. Orthographic projections preserve the true size and
shape of objects, making them useful for technical drawings and engineering
applications. There are three types of orthographic projections:

a) Front view: In this projection, the object is viewed from the front, with the
projection plane parallel to the back of the object. This projection is useful for showing
details of the front face of an object.

b) Top view: In this projection, the object is viewed from the top, with the projection
plane parallel to the bottom of the object. This projection is useful for showing details
of the top face of an object.

c) Side view: In this projection, the object is viewed from one side, with the projection
plane parallel to the opposite side of the object. This projection is useful for showing
details of one side of an object.

2. OBLIQUE PROJECTIONS:
Oblique projections are parallel projections in which the projection plane is not
perpendicular to the viewer's line of sight. This results in a more natural and realistic
image, but can also introduce distortion and perspective effects that may be
undesirable for certain applications. Oblique projections can be useful for illustrating
objects from a specific viewpoint or perspective, such as a bird's-eye view or a worm's-
eye view. There are several types of oblique projections, including:

HiCollege Click Here For More Notes 03


a) Isometric Projection: In this projection, the projection plane is tilted at an
angle of 30 degrees relative to both the x and y axes. This results in a more
natural and realistic image that preserves some sense of depth and perspective.
Isometric projections are commonly used in technical illustrations and
engineering applications where it is important to show relationships between
objects in 3D space.

b) Dimetric Projection: In this projection, the projection plane is tilted at an


angle relative to one axis (usually x or y) while remaining perpendicular to the
other axis (usually z). This results in a more natural and realistic image that
preserves some sense of depth and perspective while still maintaining
orthographic accuracy along one axis. Dimetric projections are commonly used
in architectural drawings and maps where it is important to show relationships
between objects in 3D space while still preserving orthographic accuracy along
one axis.

c) Trimetric Projection: In this projection, the projection plane is tilted at an


angle relative to all three axes (x, y, and z). This results in a more natural and
realistic image that preserves some sense of depth and perspective while still
maintaining orthographic accuracy along all three axes. Trimetric projections
are rarely used due to their complexity and potential for distortion at extreme
angles.

PERSPECTIVE PROJECTION
Perspective projection is a type of projection used in computer graphics and
photography to create a more realistic and immersive image of a 3D scene. In
perspective projection, the projection plane is tilted relative to the viewer's line
of sight, creating a more natural and realistic image that preserves some sense
of depth and spatial relationships.

In perspective projection, parallel lines that are far away from the viewer appear
to converge at a single point on the horizon, known as the vanishing point. This
creates the illusion of depth and perspective in the image, making it more
realistic and immersive.

Perspective projection can be implemented using various mathematical


techniques, such as the use of perspective transformations or ray tracing
algorithms. These techniques allow for the accurate calculation of the position
and size of objects in the scene, as well as the correct handling of shadows,
reflections, and other visual effects.

HiCollege Click Here For More Notes 04


Perspective projection is commonly used in photography, where it allows for
the creation of more natural and immersive images that capture the true depth
and spatial relationships of a scene. It is also commonly used in 3D modeling
applications, where it allows for the creation of more realistic and immersive
virtual environments.

DEPTH-BUFFER (Z-BUFFER) METHOD


The depth-buffer (also known as z-buffer) method is a technique used in
computer graphics to accurately determine which objects in a 3D scene are
visible and which are hidden behind other objects. This is important for
creating realistic and immersive images, as it allows for the correct handling of
objects that overlap or intersect in space.

In the depth-buffer method, each pixel in the image is assigned a depth value,
which represents the distance of that pixel from the viewer's perspective. The
depth value is stored in a buffer, known as the depth-buffer or z-buffer, which is
used to keep track of the relative positions of objects in the scene.

When rendering a 3D scene, the depth-buffer method works by comparing the


depth values of each pixel with the values already stored in the buffer. If the
new depth value is less than or equal to the current value, then the pixel is
considered to be hidden behind another object and is not drawn. If the new
depth value is greater than the current value, then the pixel is considered to be
visible and is drawn over any previously drawn pixels with greater depth values.

The depth-buffer method can be implemented using various mathematical


techniques, such as binary search algorithms or hierarchical z-buffers. These
techniques allow for efficient and accurate handling of large numbers of
overlapping objects in real-time applications, such as video games and virtual
reality environments.

However, the depth-buffer method can also introduce some limitations and
trade-offs, such as increased memory usage due to the storage of additional
depth values, and potential issues with aliasing or artifacts at object boundaries
due to quantization errors in the depth buffer. As a result, alternative
techniques, such as stencil shadows or alpha blending, may be used in certain
applications to address these limitations.

HiCollege Click Here For More Notes 05


DEPTH-SORTING METHOD (PAINTER‟S ALGORITHM)
The depth-sorting method, also known as the painter's algorithm, is a simple
technique used in computer graphics to determine the correct order in which
objects should be drawn in a 2D or 3D scene. This is important for creating
realistic and immersive images, as it allows for the correct handling of objects
that overlap or intersect in space.

The depth-sorting method works by sorting objects based on their distance


from the viewer's perspective. Objects that are closer to the viewer are drawn
first, followed by objects that are further away. This ensures that objects that
should be hidden behind other objects are not drawn on top of them, resulting
in a more accurate and realistic image.

In the painter's algorithm, objects are sorted based on their z-coordinate


(depth) values, with smaller z-values representing closer objects. The algorithm
then iterates through the sorted list of objects, drawing each object in the
correct order based on its z-value.

The depth-sorting method can be implemented using various techniques, such


as sorting algorithms or priority queues. These techniques allow for efficient
and accurate handling of large numbers of overlapping objects in real-time
applications, such as video games and virtual reality environments.

HiCollege Click Here For More Notes 06

You might also like