SlideShare une entreprise Scribd logo
1  sur  18
May 2012 1
Back-Face Detection
( )A point , , is behind a polygon surface if 0,
where , , and are the plane parameters of the polygon. Test is
simplified by considering normal of face and viewing direction.
x y z Ax By Cz D
A B C D
+ + + <
( ), ,A B C=N
viewV
( )
view
view
A polygon is back face if 0. In a right-handed
viewing system viewing direction is along negative axis,
0,0, 1 . Then, a polygon is a back face if 0.
z
C
× >
= − ≤
V N
V
May 2012 2
Depth-Buffer Methods
Three surfaces overlapping pixel position (x,y) on the view plane.
The visible surface, S1, has the smallest depth value.
vx
vy
vz
3S
2S
1S
( ),x y
view plane
May 2012 3
( )
( )
Initialize each pixel ( , ) of depth buffer and frame buffer (color):
, 1. // Z is normalized to [0,1.0]
//
0;
, background color; initialize
for ea
to backgroun
h
d
c p
x y
depthBuf x y
frameBuf x y
=
=
Z - Buffer Algorithm
( )
( ) ( )
( )
olygon {
for each pixel , polygon {
if
// traverse all polygons
// rasterization
//( , , ) {
get (compute) , ;
check closer pixel
// compute color of pixel
x y
z x y depthBuf x y
color x y
d
∈
>
( ) ( ) ( ) ( ), , ; , , ;
}}}
epthBuf x y z x y frameBuf x y color x y= =
May 2012 4
Efficient Depth Calculation
Given the depth value in a vertex of a polygon, the depth of any
other point in the plane containing the polygon can be
calculated efficiently (additions only).
( )
( ) ( )
Depth is calculated from plane equatuion .
At rasterization along scan-line changes by 1. Therefore,
1 1 , and the ratio
is constant for the entire polygon.
z Ax By D C
x
z x A x By D C z A C A C
= − − −
±
+ = − + − − = − −  
May 2012 5
A-Buffer Method
It is named so since z-buffer is used for depth semantics and in
some sense a-buffer has the nature of the other end of alphabet. It
is an extension using antialiasing, area-averaging visibility
detection method, supporting transparency.
background opaque
surface
foreground
transparent surface
08/04/15©Zachary Wartell
Scan-Line Method
• Unlike z-buffer or A-buffer, scan-line method has depth info only for
a single scan-line.
• In order to require one scan-line of depth values, we must group
and process all polygons intersecting a given scan-line at the same
time before process the next scan-line
• Build table of edges of all polygons in scene. Maintain active-edge-
table as we visit each scan-line in scene. AET now contains edges
for all polygons at that scanline. Must maintain flag for each
surface to determine whether pixel on scan-line is inside that
surface.
scan-line
08/04/15©Zachary Wartell
Scan-Line Method Basic Example
• Scan Line 1:
– (A,B) to (B,C) only inside S1, so color from S1
– (E,H) to (F,G) only inside S2, so color from S2
• Scan Line 2:
– (A,D) to (E,H) only inside S1, so color from S1
– (E,H) to (B,C) inside S1 and S2 , so compute & test depth
In this example we color from S1
– (B,C) to (F,G) only inside S2, so color from S2
B
A
D
C
G
F
E
H
S1 S2
Scan Line 1
Scan Line 2
Scan Line 3
08/04/15©Zachary Wartell
Scan-Line Method Generalization
• This basic approach fails when surfaces cut-
through each other or overlap. To generalize
we must divide surfaces to eliminate overlaps
08/04/15©Zachary Wartell
Depth-Sorting Method
• Painter’s Algorithm
• Approach:
– sorted surfaces by increasing depth
• may require surface splitting
– scan-convert surfaces in sorted order (back to
front)
• Use a sequence of sorting steps and tests of
increasing computational complexity to
handle all possible cases of polygon depth
orderings
08/04/15©Zachary Wartell
• Sort surfaces by each surface’s smallest z into
list:
(S1,S2,… Si… SN)
• For all Si ,i∈[2, N]
• If farthest surface SF has no z overlap render it.
(easy case)
• If there is z overlap with SF, we can still avoid
reordering if one of four conditions holds. So
we test these conditions…
Depth Sorting Details
z
SF=S1
Si
zmin2
zmax2
zmin1
zmax1
z
SF=S1
Si
zmin2
zmax2
zmin1
zmax1
farther from
PRP !
08/04/15©Zachary Wartell
Depth Sorting: Reorder Avoidance Tests
• We can avoid reorder if:
1) Bounding rectangles in xy don’t overlap
2) Sf is completely behind overlapping surface
relative to view position
3) Overlapping surface is completely in front of
Sf relative to view position
4) Boundary edges of projections of two
surfaces on projection plane don’t overlap
z
Sf
S2
xmin1 xmax1 xmin2 xmax2
1)
Sf
S2
2) 3)
z z
Sf
S2
08/04/15©Zachary Wartell
BSP-trees
Binary Space Partition is a relatively easy way to sort the polygons relative to the eyepoint
To Build a BSP Tree
1. Choose a polygon, T, and compute the equation of the plane it defines.
2. Test all the vertices of all the other polygons to determine if they are in front of, behind, or in
the same plane as T. If the plane intersects a polygon, divide the polygon at the plane.
3. Polygons are placed into a binary search tree with T as the root.
4. Call the procedure recursively on the left and right subtree.
Larry F. Hodges, Drew Kessler
08/04/15©Zachary Wartell
Traversing BSP-Tree
• Traverse the BSP tree such that the
branch descended first is the side that is
away from the eyepoint. This can be
determined by substituting the eye point
into the plane equation for the polygon at
the root.
• When there is no first branch to descend,
or that branch has been completed then
render the polygon at this node.
• After the current node's polygon has been
rendered, descend the branch that is
closer to the eyepoint.Larry F. Hodges, Drew Kessler
08/04/15©Zachary Wartell
Area-Subdivision Method
• Recursively subdivide viewplane into quadrants until:
– rectangle contains part of 1 projected surface
– rectangle contains part of no surface
– rectangle is size of pixel
08/04/15©Zachary Wartell
Area-Subdivision Method
• We need tests that can quickly determine tell if current area is part
of one surface or if further subdivision is needed.
• Four cases for relation between surface and rectangular area:
surrounding
surface
overlapping
surface
inside
surface
outside
surface
08/04/15©Zachary Wartell
Area-Subdivision: Stopping Conditions
• Recursive subdivision can stop when either:
1) a rectangle has all surfaces outside
2) a rectangle has exactly one inside, overlapping, or
surrounding surface
3) a rectangle has one surrounding surface and the
surface occludes all other surfaces in the area
• For efficiency:
– compare rectangle to projected surface bounding
rectangle first. Only perform exact interaction
test if necessary. If single bounding rect.
intersects rectangle, test for exact intersection
and color the framebuffer for the intersection of
08/04/15©Zachary Wartell
Octrees
• Octree:
– partitions 3-space by a regular, recursive subdivision of 3-space into
axis-aligned boxes
– 3D objects are stored in the octree node that contains them.
Recursively subdivide until each octree node is either empty, a
homogeneous volume, or contains single object that’s “easy” to
compute visibility (example can use back-face culling alone).
3 2
0 1
4 5
6
7
0 1 2 3 4 5 6 7
Any of these octants could then be
recursively subdivide
08/04/15©Zachary Wartell
Ray-Casting Method
• based geometric optics method that trace rays of light
• “backwards” light path tracing
• compare to depth buffer (surfaces to pixels versus pixel to surfaces)
• special case of ray-tracing
COP
pixel
view plane

Contenu connexe

Tendances

2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphicsKALESHWAR KUMAR
 
Visible surface detection methods
Visible surface detection methodsVisible surface detection methods
Visible surface detection methodsKABILESH RAMAR
 
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...rohitjasudkar
 
Visible surface identification
Visible surface identificationVisible surface identification
Visible surface identificationPooja Dixit
 
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERK-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERkunal kishore
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithmMani Kanth
 
projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing Krishna Gali
 

Tendances (19)

2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
Visible surface detection methods
Visible surface detection methodsVisible surface detection methods
Visible surface detection methods
 
Sr 01-40 good
Sr 01-40 goodSr 01-40 good
Sr 01-40 good
 
Karnaugh Map (K-map)
Karnaugh Map (K-map)Karnaugh Map (K-map)
Karnaugh Map (K-map)
 
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
 
Visible surface identification
Visible surface identificationVisible surface identification
Visible surface identification
 
UNIT-V
UNIT-VUNIT-V
UNIT-V
 
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERK-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
Curves and Surfaces
Curves and SurfacesCurves and Surfaces
Curves and Surfaces
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Karnaugh Map
Karnaugh MapKarnaugh Map
Karnaugh Map
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithm
 
Boundary fill algm
Boundary fill algmBoundary fill algm
Boundary fill algm
 
A bufferrrrrrrrrr (1)
A bufferrrrrrrrrr (1)A bufferrrrrrrrrr (1)
A bufferrrrrrrrrr (1)
 
Implementation
ImplementationImplementation
Implementation
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
posterfinal
posterfinalposterfinal
posterfinal
 
projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing
 

En vedette

BGBM - Lead Magnets
BGBM - Lead MagnetsBGBM - Lead Magnets
BGBM - Lead MagnetsDaniel Smith
 
Language acquisition
Language acquisitionLanguage acquisition
Language acquisitionpalmerka
 
P.O.R.T.A.L. (Museum Walk Edition)
P.O.R.T.A.L. (Museum Walk Edition)P.O.R.T.A.L. (Museum Walk Edition)
P.O.R.T.A.L. (Museum Walk Edition)Elizabeth Thomas
 
Business Growth Blueprint (Pt 2)
Business Growth Blueprint (Pt 2)Business Growth Blueprint (Pt 2)
Business Growth Blueprint (Pt 2)Daniel Smith
 
Business Growth Blueprint (Pt 1)
Business Growth Blueprint (Pt 1)Business Growth Blueprint (Pt 1)
Business Growth Blueprint (Pt 1)Daniel Smith
 
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...Pope Francis -- social media superstar, will you Skype with kids from St. Ray...
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...brashkudos675
 
Turn Visitors into Leads
Turn Visitors into LeadsTurn Visitors into Leads
Turn Visitors into LeadsDaniel Smith
 
Slideshare Growth Planning
Slideshare Growth PlanningSlideshare Growth Planning
Slideshare Growth PlanningDaniel Smith
 
Plus Size Lingerie
Plus Size LingeriePlus Size Lingerie
Plus Size Lingeriesaucyladies1
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection ielaya1984
 

En vedette (15)

NVSLPAVANI
NVSLPAVANINVSLPAVANI
NVSLPAVANI
 
BGBM - Lead Magnets
BGBM - Lead MagnetsBGBM - Lead Magnets
BGBM - Lead Magnets
 
Language acquisition
Language acquisitionLanguage acquisition
Language acquisition
 
Buzo
BuzoBuzo
Buzo
 
P.O.R.T.A.L. (Museum Walk Edition)
P.O.R.T.A.L. (Museum Walk Edition)P.O.R.T.A.L. (Museum Walk Edition)
P.O.R.T.A.L. (Museum Walk Edition)
 
Business Growth Blueprint (Pt 2)
Business Growth Blueprint (Pt 2)Business Growth Blueprint (Pt 2)
Business Growth Blueprint (Pt 2)
 
Business Growth Blueprint (Pt 1)
Business Growth Blueprint (Pt 1)Business Growth Blueprint (Pt 1)
Business Growth Blueprint (Pt 1)
 
CV Muhammad Usman
CV Muhammad  UsmanCV Muhammad  Usman
CV Muhammad Usman
 
Home Automation
Home AutomationHome Automation
Home Automation
 
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...Pope Francis -- social media superstar, will you Skype with kids from St. Ray...
Pope Francis -- social media superstar, will you Skype with kids from St. Ray...
 
What is growth?
What is growth?What is growth?
What is growth?
 
Turn Visitors into Leads
Turn Visitors into LeadsTurn Visitors into Leads
Turn Visitors into Leads
 
Slideshare Growth Planning
Slideshare Growth PlanningSlideshare Growth Planning
Slideshare Growth Planning
 
Plus Size Lingerie
Plus Size LingeriePlus Size Lingerie
Plus Size Lingerie
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection i
 

Similaire à rural marketing ppt

Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removalAnkit Garg
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferRaj Sikarwar
 
Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithmKKARUNKARTHIK
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjtepournima055
 
Clipping & Rasterization
Clipping & RasterizationClipping & Rasterization
Clipping & RasterizationAhmed Daoud
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fillwahab13
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmJyotiraman De
 
ImageSegmentation (1).ppt
ImageSegmentation (1).pptImageSegmentation (1).ppt
ImageSegmentation (1).pptNoorUlHaq47
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.pptAVUDAI1
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.pptDEEPUKUMARR
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptxNaveenKumar5162
 

Similaire à rural marketing ppt (20)

Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithm
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Clipping & Rasterization
Clipping & RasterizationClipping & Rasterization
Clipping & Rasterization
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fill
 
Surface design and visible surfaces
Surface design and visible surfacesSurface design and visible surfaces
Surface design and visible surfaces
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
testpang
testpangtestpang
testpang
 
ImageSegmentation (1).ppt
ImageSegmentation (1).pptImageSegmentation (1).ppt
ImageSegmentation (1).ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptx
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
Polar area
Polar areaPolar area
Polar area
 
LEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdfLEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdf
 
UNIT2.pptx
UNIT2.pptxUNIT2.pptx
UNIT2.pptx
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 

rural marketing ppt

  • 1. May 2012 1 Back-Face Detection ( )A point , , is behind a polygon surface if 0, where , , and are the plane parameters of the polygon. Test is simplified by considering normal of face and viewing direction. x y z Ax By Cz D A B C D + + + < ( ), ,A B C=N viewV ( ) view view A polygon is back face if 0. In a right-handed viewing system viewing direction is along negative axis, 0,0, 1 . Then, a polygon is a back face if 0. z C × > = − ≤ V N V
  • 2. May 2012 2 Depth-Buffer Methods Three surfaces overlapping pixel position (x,y) on the view plane. The visible surface, S1, has the smallest depth value. vx vy vz 3S 2S 1S ( ),x y view plane
  • 3. May 2012 3 ( ) ( ) Initialize each pixel ( , ) of depth buffer and frame buffer (color): , 1. // Z is normalized to [0,1.0] // 0; , background color; initialize for ea to backgroun h d c p x y depthBuf x y frameBuf x y = = Z - Buffer Algorithm ( ) ( ) ( ) ( ) olygon { for each pixel , polygon { if // traverse all polygons // rasterization //( , , ) { get (compute) , ; check closer pixel // compute color of pixel x y z x y depthBuf x y color x y d ∈ > ( ) ( ) ( ) ( ), , ; , , ; }}} epthBuf x y z x y frameBuf x y color x y= =
  • 4. May 2012 4 Efficient Depth Calculation Given the depth value in a vertex of a polygon, the depth of any other point in the plane containing the polygon can be calculated efficiently (additions only). ( ) ( ) ( ) Depth is calculated from plane equatuion . At rasterization along scan-line changes by 1. Therefore, 1 1 , and the ratio is constant for the entire polygon. z Ax By D C x z x A x By D C z A C A C = − − − ± + = − + − − = − −  
  • 5. May 2012 5 A-Buffer Method It is named so since z-buffer is used for depth semantics and in some sense a-buffer has the nature of the other end of alphabet. It is an extension using antialiasing, area-averaging visibility detection method, supporting transparency. background opaque surface foreground transparent surface
  • 6. 08/04/15©Zachary Wartell Scan-Line Method • Unlike z-buffer or A-buffer, scan-line method has depth info only for a single scan-line. • In order to require one scan-line of depth values, we must group and process all polygons intersecting a given scan-line at the same time before process the next scan-line • Build table of edges of all polygons in scene. Maintain active-edge- table as we visit each scan-line in scene. AET now contains edges for all polygons at that scanline. Must maintain flag for each surface to determine whether pixel on scan-line is inside that surface. scan-line
  • 7. 08/04/15©Zachary Wartell Scan-Line Method Basic Example • Scan Line 1: – (A,B) to (B,C) only inside S1, so color from S1 – (E,H) to (F,G) only inside S2, so color from S2 • Scan Line 2: – (A,D) to (E,H) only inside S1, so color from S1 – (E,H) to (B,C) inside S1 and S2 , so compute & test depth In this example we color from S1 – (B,C) to (F,G) only inside S2, so color from S2 B A D C G F E H S1 S2 Scan Line 1 Scan Line 2 Scan Line 3
  • 8. 08/04/15©Zachary Wartell Scan-Line Method Generalization • This basic approach fails when surfaces cut- through each other or overlap. To generalize we must divide surfaces to eliminate overlaps
  • 9. 08/04/15©Zachary Wartell Depth-Sorting Method • Painter’s Algorithm • Approach: – sorted surfaces by increasing depth • may require surface splitting – scan-convert surfaces in sorted order (back to front) • Use a sequence of sorting steps and tests of increasing computational complexity to handle all possible cases of polygon depth orderings
  • 10. 08/04/15©Zachary Wartell • Sort surfaces by each surface’s smallest z into list: (S1,S2,… Si… SN) • For all Si ,i∈[2, N] • If farthest surface SF has no z overlap render it. (easy case) • If there is z overlap with SF, we can still avoid reordering if one of four conditions holds. So we test these conditions… Depth Sorting Details z SF=S1 Si zmin2 zmax2 zmin1 zmax1 z SF=S1 Si zmin2 zmax2 zmin1 zmax1 farther from PRP !
  • 11. 08/04/15©Zachary Wartell Depth Sorting: Reorder Avoidance Tests • We can avoid reorder if: 1) Bounding rectangles in xy don’t overlap 2) Sf is completely behind overlapping surface relative to view position 3) Overlapping surface is completely in front of Sf relative to view position 4) Boundary edges of projections of two surfaces on projection plane don’t overlap z Sf S2 xmin1 xmax1 xmin2 xmax2 1) Sf S2 2) 3) z z Sf S2
  • 12. 08/04/15©Zachary Wartell BSP-trees Binary Space Partition is a relatively easy way to sort the polygons relative to the eyepoint To Build a BSP Tree 1. Choose a polygon, T, and compute the equation of the plane it defines. 2. Test all the vertices of all the other polygons to determine if they are in front of, behind, or in the same plane as T. If the plane intersects a polygon, divide the polygon at the plane. 3. Polygons are placed into a binary search tree with T as the root. 4. Call the procedure recursively on the left and right subtree. Larry F. Hodges, Drew Kessler
  • 13. 08/04/15©Zachary Wartell Traversing BSP-Tree • Traverse the BSP tree such that the branch descended first is the side that is away from the eyepoint. This can be determined by substituting the eye point into the plane equation for the polygon at the root. • When there is no first branch to descend, or that branch has been completed then render the polygon at this node. • After the current node's polygon has been rendered, descend the branch that is closer to the eyepoint.Larry F. Hodges, Drew Kessler
  • 14. 08/04/15©Zachary Wartell Area-Subdivision Method • Recursively subdivide viewplane into quadrants until: – rectangle contains part of 1 projected surface – rectangle contains part of no surface – rectangle is size of pixel
  • 15. 08/04/15©Zachary Wartell Area-Subdivision Method • We need tests that can quickly determine tell if current area is part of one surface or if further subdivision is needed. • Four cases for relation between surface and rectangular area: surrounding surface overlapping surface inside surface outside surface
  • 16. 08/04/15©Zachary Wartell Area-Subdivision: Stopping Conditions • Recursive subdivision can stop when either: 1) a rectangle has all surfaces outside 2) a rectangle has exactly one inside, overlapping, or surrounding surface 3) a rectangle has one surrounding surface and the surface occludes all other surfaces in the area • For efficiency: – compare rectangle to projected surface bounding rectangle first. Only perform exact interaction test if necessary. If single bounding rect. intersects rectangle, test for exact intersection and color the framebuffer for the intersection of
  • 17. 08/04/15©Zachary Wartell Octrees • Octree: – partitions 3-space by a regular, recursive subdivision of 3-space into axis-aligned boxes – 3D objects are stored in the octree node that contains them. Recursively subdivide until each octree node is either empty, a homogeneous volume, or contains single object that’s “easy” to compute visibility (example can use back-face culling alone). 3 2 0 1 4 5 6 7 0 1 2 3 4 5 6 7 Any of these octants could then be recursively subdivide
  • 18. 08/04/15©Zachary Wartell Ray-Casting Method • based geometric optics method that trace rays of light • “backwards” light path tracing • compare to depth buffer (surfaces to pixels versus pixel to surfaces) • special case of ray-tracing COP pixel view plane