Estruturas de Dados Espaciais - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Estruturas de Dados Espaciais

Description:

Estruturas de Dados Espaciais. MC-930. MO-603. Speeding Up Ray Tracing ... The fact that a ray passes through a cell and hits na object doesn't mean the ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 21
Provided by: lmar6
Category:

less

Transcript and Presenter's Notes

Title: Estruturas de Dados Espaciais


1
Estruturas de Dados Espaciais
  • MC-930
  • MO-603

2
Speeding Up Ray Tracing
3
Estruturas de Dados Espaciais
4
Bounding Volumes
5
Hierarquical Bounding Volume
6
Grids
  • Data structure a 3-D array of cells (voxels)
    that tile space
  • Each cell points to list of all surfaces
    intersecting that cell

7
Mais sobre Grids
  • Be Careful! The fact that a ray passes through a
    cell and hits na object doesnt mean the ray hit
    that object in that cell
  • Optimization cache intersection point and ray id
    in mailbox associated with each object
  • Grids are a poor choice when the world is
    nonhomogeneous (clumpy)
  • e.g. a teapot in a stadium many polygons
    clustered in a small space
  • How many cells to use?
  • too few Þ many objects per cell Þ slow
  • too many Þ many empty cells to step through Þ
    slow
  • Grids work well when you can arrange that each
    cell lists a few (ten, say) objects
  • Better strategy for some scenes nested grids

8
Octrees
9
Which Structure is Best for Ray Tracing?
10
K-d Trees and BSP Trees
11
Building a BSP Tree
d
1
2
c
a
3
1
2
b
a
b
c
d
3
the subdivision of space it implies
a BSP tree using 2 as root
viewpoint
12
Building the Tree 2
Using line 3 for the root requires a split
3
1
2a
2a
2b
3
2b
1
viewpoint
13
Building a Good Tree - the tricky part
14
Uses for Binary Space Partitioning (BSP) Trees
15
Painters Algorithm with BSP trees
16
Drawing a BSP Tree
front_to_back(tree, viewpt) if
(tree null) return if
(positive_side_of(root(tree), viewpt))
front_to_back(positive_branch(tree, viewpt)
display_polygon(root(tree))
front_to_back(negative_branch(tree, viewpt)
else draw negative branch
first
17
Drawing Back to Front
Hidden surface removal
3
1
2a
2a
2b
3
2b
1
viewpoint
18
Clipping BSP Trees
19
Clipping BSP Trees
20
Clipping Using Spatial Data Structures
Write a Comment
User Comments (0)
About PowerShow.com