Unit-5 Computer Graphics Part-1
Unit-5 Computer Graphics Part-1
Unit-V Part 1:
Topic : Hidden Lines and Curves: Back
Face Detection
Subject Name: Computer Graphics
●
Algorithms to determine which parts of the
shapes are to be rendered in 3D coordinates.
●
Methods based on comparison of objects for their
3D positions and dimensions with respect to a
viewing position.
●
Efficient for small number of objects but difficult
to implement.
●
Depth sorting, area subdivision methods.
Image Space Methods
●
Based on the pixels to be drawn on 2D. Try to
determine which object should contribute to
that pixel.
●
Running time complexity is the number of
pixels times number of objects.
●
Space complexity is two times the number of
pixels:
– One array of pixels for the frame buffer
– One array of pixels for the depth
●
Coherence
buffer properties of surfaces can be
●
used. Depth-buffer and ray casting methods.
Depth Cueing
●
Hidden surfaces are not removed but displayed
with different effects such as intensity, color, or
shadow for giving hint for third dimension of the
●
object.
Simplest solution: use different colors-
intensities based on the dimensions of the
shapes.
Hidden-surface elimination Or
Visible surface detection
• When we view a picture containing non-transparent
objects and surfaces, then we cannot see those
objects from view which are behind other objects.
• We must remove hidden surfaces to get a realistic
screen image.
• The identification and removal of these surfaces is
called Hidden- surface elimination or We need to
identify those parts of a screen that are visible from
a chosen viewing position. (Visible surface
detection)
Hidden-surface elimination Or
Visible surface detection
There are two
methods of it
1. Object-space
Methods
2. Image-space
Methods
Hidden-surface elimination Or
Visible surface detection
Object-space Methods
An object-space method compare objects and parts
of objects to each other within the scene definition
to determine which surfaces, as a whole, we should
label as visible.
Line display algorithms generally use object space
methods to identify visible lines in wireframe
displays.
Image-space Methods
• In an image space algorithm, visibility is decided
point by point at each pixel position on the
Back Face Detection algorithm
(Object Space Method)
• A fast and simple object-space method for
identifying the back faces of a polyhedron is based
on the "inside-outside" tests.
• A point (x, y, z) is "inside" a polygon surface with
plane parameters A, B, C, and D if
• Ax + By + Cz + D <0
• Where coefficients A, B, C, and D are constants
describing the spatial properties of the plane.
Back Face Detection algorithm
• We can simplify this test by
considering the normalvector N to
a polygon surface, which has Cartesian
components (A, B, C).
• In general, if V is a vector in the viewing
direction from the eye (or "camera") position,
then this polygon is a back face
if V.N > 0
Back Face Detection algorithm
• Furthermore, if object descriptions are converted to
projection coordinates and your viewing direction is
parallel to the viewing z- axis, then −
• V = (0, 0, Vz) and V.N = VZC
• So that we only need to consider the sign of C the
component of the normal vector N.
Back Face Detection algorithm
Image space:
Objects: 3 D Clipping
Transformed to Screen Coordinates
Hidden Surface Removal
Any Query ?
www.sachinplacement.blogspot.com
or mail at
[email protected]