Download Copyright © 2012 Pearson Education, Inc. All rights reserved.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Binary search tree wikipedia , lookup

Transcript
Many of the figures from this book may be reproduced free of charge in scholarly articles,
proceedings, and presentations, provided only that the following citation is clearly indicated:
“Reproduced with the permission of the publisher from Computer Graphics: Principles and Practice,
Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D.
Foley, Steven K. Feiner, and Kurt Akeley. Copyright 2014 by Pearson Education, Inc.”
Reproduction for any use other than as stated above requires the written permission of Pearson
Education, Inc. Reproduction of any figure that bears a copyright notice other than that of Pearson
Education, Inc., requires the permission of that copyright holder.
Figure 37.1 A gargoyle model embedded in an oct tree. The cube volume
surrounding the model is recursively subdivided into smaller cubes, forming a
tree data structure that allows efficient spatial intersection queries compared to
iterating exhaustively over the triangles in the mesh. The boundaries of the cube
cells are visualized as thin lines in this image. (Courtesy of Preshu Ajmera.)
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.2 During any time interval, a sphere moving with constant velocity
traces the volume of a capsule. If the intersection of the capsule and the boxes
is not empty during a time interval, a collision occurred during that interval.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.3 (Left) The geometric intersection of a ball with a set of boxes in 2D.
(Right) A conservative result that may be more efficient to compute.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.4 Approximating a short capsule (dashed line) with a
bounding ball (solid line). To satisfy persistence of vision, the rendering
frame rate for an animation is usually chosen so that objects move only
a fraction of their own extent between frames. In this case, a static
bounding ball around the path of a dynamic ball is not too conservative.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.5 (Left) The geometric intersection I of a 2D query ray Q with box B.
(Right) The point F that we call the first intersection between the ray and box, that
is, the point on the geometric intersection that is closest to the ray origin.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.6 A set of points distributed in 2D and two logical data
structures describing them with list semantics. The list interface on the left
relies on an underlying array. The one on the right uses an underlying
linked list. Note that the order of elements within the list is arbitrary.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.7 A depiction of a 1D binary tree as partitions (black lines) of values
with associated keys (red disks). The thickness of the partition line represents
the tree depth of that partition node in the tree; the root is the thickest.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.8 An alternative choice of tree structure for the same data
shown in Figure 37.7. This tree is shallower and contains multiple
primitives per node, indicated by adjacent boxes. Such a structure
might be preferred if the overhead of processing a node is high.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.9 A depiction of a 2D binary space partition tree (BSP) as partitions (black
lines) of values with associated keys (red disks). The thickness of the partition line
represents the tree depth of that partition node in the tree; the root is the thickest.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.10 A degenerate BSP tree with the same asymptotic performance as a list.
The poor performance results from an ineffective choice of partitions. This situation can
arise even with a good tree-building strategy if elements move after the partitions have
been placed. Even worse trees exist—there could be many empty partitions.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.11 A quad tree. If a cluster of data points is not split by a low power-of-two plane position,
the tree may become very deep, as near primitives c and d in this example. A better tree-building
strategy for this particular data set would have been to make a second-level node containing two
primitives, rather than subdividing until each node contained a single primitive. However, if c and d
represented clusters of hundreds of primitives, no efficient tree would be possible—either many
primitives would lie at each node, or there would be a long degenerate chain of internal nodes.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.12 A depiction of a 2D axis-aligned box bounding volume hierarchy (BVH).
This is an alternate form of tree to the binary space partition tree that provides tighter
bounds but does not allow updates without modifying the tree structure.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.13 A depiction of a 2D grid of values with point keys. The
logical structure is that of an implementation that unrolls the underlying
2D array in row-major order starting from the bottom row.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.14 Ray traversal of a 2D grid (from [AW87]). To correctly traverse
the grid, a traversal algorithm must visit cells a, b, c, d, e, f, g, and h in that
order. (Reprinted from Eurographics 1987: Conference Proceedings, 1987
(ISBN 0444702911), Marechal ed., John Amanatides and Andrew Woo, pp.
1–10, “A Fast Voxel Traversal Algorithm for Ray Tracing,” Figure 1.)
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.15 A case where it is essential only to test for intersections that lie within
each cell during the ray-marching process of ray-triangle intersection accelerated by
a spatial grid. (Redrawn from Eurographics 1987: Conference Proceedings, 1987
[ISBN 0444702911], Marechal ed., John Amanatides and Andrew Woo, pp. 1–10, “A
Fast Voxel Traversal Algorithm for Ray Tracing,” Figure 1.)
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.16 (Left) Large g gives small grid cells. A ray iterator must touch many
cells (shown with solid black borders), but most of those will be empty. This is good
if the cost of testing for a geometric intersection is large compared to the cost of
iterating through (or storing) cells. (Right) Small g gives large grid cells. A ray
iterates through few grid cells, but those contain many elements: The conservative
ray-cell test produces many false positives. This is good if the cost of testing for a
geometric intersection is small compared to that of iterating through cells.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.
Figure 37.17 Hypothetical top view of a city on an island. (Left) Small
grid cells give inhomogeneous geometric density. (Right) Sufficiently
large cells produce approximately uniform density for this scene.
From Computer Graphics, Third Edition, by John F. Hughes, Andries van Dam, Morgan McGuire, David F. Sklar, James D. Foley, Steven K. Feiner, and Kurt Akeley (ISBN-13: 978-0-321-39952-6).
Copyright © 2014 by Pearson Education, Inc. All rights reserved.