Visible Surface Detection Methods
Visible Surface Detection Methods
Methods
Presented By
Renupama Singha
MCA 4th semester
Roll No:15/29
contents
Introduction
Scan-Line Method
Depth-Sorting Method
Introduction
Classification of Visible Surface
Detection Algorithms
To improve performance
Sorting
• Facilitate depth comparison
Coherence
• To take advantage of regularities in a scene
Scan-Line Method
Characteristics
extension of the scan line algorithm for filling
polygon interior
Polygon Table
• Coefficients of the plane equation for each surface
• Intensity information for the surfaces
• Pointers into the edge table
Active List & Flag
Active List
• Contain only edges across the current scan line
• Sorted in order of increasing x
Flag
• Indicate whether a position along a scan line is inside or outside of the
surface
• At the leftmost boundary of a surface
o The surface flag is turned on
• At the rightmost boundary of a surface
oThe surface flag is turned off
Example
Active list for scan line 1
Edge table
• AB, BC, EH, and FG
• Between AB and BC, only the flag
for surface S1 is on
o No depth calculations are
necessary
o Intensity for surface S1 is
entered into the refresh
buffer
• Similarly, between EH and FG,
only the flag for S2 is on
10
For scan line 2, 3
• AD, EH, BC, and FG
Between AD and EH, only the flag for S1 is on
Functions
• Surfaces are sorted in order of decreasing depth
Process
• Sort surfaces according to their distance from the view plane
• The intensities for the farthest surface are then entered into the refresh buffer
• Taking each succeeding surface in decreasing depth order
Overlapping Tests
Tests for each surface that overlaps with S
the tests are listed in order of increasing difficulty
1. The bounding rectangle in the xy plane for the two surfaces do not overlap
2. Surface S is completely behind the overlapping surface relative to the viewing
position
3. The overlapping surface is completely in front of S relative to the viewing position
4. The projections of the two surfaces onto the view plane do not overlap
If all the surfaces pass at least one of the tests, none of them
is behind S
No reordering is then necessary and S is scan converted
Overlapping Test Examples
Surface Reordering
• Repeat the tests for each surface that is reordered in the list
S’ S’’
S S’
S
xv xv
zv zv
<S S’> <S S’’, then S’’ S’>
Drawback
If two or more surfaces alternately obscure each other
• infinite loop
To avoid such loops
• Flag any surface that has been reordered to a farther depth position
so It can not be moved again