Download presentation
Presentation is loading. Please wait.
1
Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware
Kenneth E. Hoff III, Tim Culver, John Keyser, Ming Lin, and Dinesh Manocha University of North Carolina at Chapel Hill SIGGRAPH ‘99 I will present a fast and simple way to compute generalized Voronoi diagrams using standard graphics hardware. This work was done in conjunction with Tim Culver, John Keyser, Ming Lin, and Dinesh Manocha at the University of North Carolina at Chapel Hill.
2
What is a Voronoi Diagram?
Given a collection of geometric primitives, it is a subdivision of space into cells such that all points in a cell are closer to one primitive than to any other Voronoi Site First of all, what is a Voronoi diagram? Given a collection of geometric primitives, a Voronoi diagram is a subdivision of space into cells, such that all points in a cell are closer to one primitive than to any other. The geometric primitives are called Voronoi sites, the cells are called Voronoi regions, and the Voronoi diagram is the set of all Voronoi regions. Voronoi Region
3
Ordinary Generalized Point sites Nearest Euclidean distance
Higher-order site geometry Varying distance metrics Higher-order Sites 2.0 Voronoi diagrams have two top-level classifications: ordinary which refers to diagrams computed over points in any dimension using the nearest Euclidean distance metric, and generalized which refers to diagrams with higher-order site geometry or with varying distance metrics. 0.5 Weighted Distances
4
Why Should We Compute Them?
It is a fundamental concept Descartes Astronomy “Heavens” Dirichlet Math Dirichlet tesselation Voronoi Math Voronoi diagram Boldyrev Geology area of influence polygons Thiessen Meteorology Theissen polygons Niggli Crystallography domains of action Wigner & Seitz Physics Wigner-Seitz regions Frank & Casper Physics atom domains Brown Ecology areas potentially available Mead Ecology plant polygons Hoofd et al. Anatomy capillary domains Icke Astronomy Voronoi diagram The Voronoi diagram is a fundamental concept that has been independently rediscovered many times in many different fields over the past 450 years. As a result, it has been given many different names, the most common being the Voronoi diagram. This list represents some of the most influential rediscoveries in the physical sciences. There are many more instances many of which extend into the social sciences.
5
Why Should We Compute Them?
Useful in a wide variety of applications Collision Detection Surface Reconstruction Robot Motion Planning Non-Photorealistic Rendering Surface Simplification Mesh Generation Shape Analysis Voronoi diagrams have also been useful in a wide variety of recent applications. Here are some common examples.
6
“Ultimate” Proximity Information
What Makes Them Useful? “Ultimate” Proximity Information Nearest Site Maximally Clear Path Voronoi diagrams are often said to give the ultimate proximity information. For example, The nearest site to a query point is the site whose Voronoi region contains the query point. The maximally clear path around the sites is along the Voronoi boundaries. We can estimate the density of the sites based on the relative sizes of their Voronoi regions. The nearest neighbors are the sites whose Voronoi regions share a boundary. What’s interesting is that, in a point diagram, if we connect all nearest neighbors of a point diagram by an edge we will construct the dual of the Voronoi diagram - called the Delaunay triangulation! Density Estimation Nearest Neighbors
7
Outline Generalized Voronoi Diagram Computation
Exact and Approximate Algorithms Previous Work Our Goal Basic Idea Our Approach Basic Queries Applications Conclusion I will now describe two classes of algorithms for computing generalized Voronoi diagrams, discuss previous work, and then state our main goal.
8
Generalized Voronoi Diagram Computation “Exact” Algorithms
Previous work Lee82 Chiang92 Okabe92 Dutta93 Milenkovic93 Hoffmann94 Sherbrooke95 Held97 Culver99 Exact algorithms directly compute an analytically exact representation of the Voronoi boundaries. Computes Analytic Boundary
9
Previous Work: “Exact” Algorithms
Compute analytic boundaries but... Boundaries composed of high-degree curves and surfaces and their intersections Complex and difficult to implement Robustness and accuracy problems These algorithms compute analytic boundaries which requires representing and manipulating high-degree curves and surfaces and their intersections This not only makes them complex and difficult to implement, but it also makes them suffer from robustness and accuracy problems. In an attempt to overcome many of these difficulties, approximate algorithms are often used.
10
Generalized Voronoi Diagram Computation
Approximate Algorithms Exact Algorithm Approximate algorithms simplify the problem by either discretizing the sites or by discretizing the space containing the sites. In the center image, the higher-order line site is point-sampled. The Voronoi diagram of these points forms a piecewise-linear approximation to the Voronoi boundary. In the right image, a volumetric representation is constructed by determining which Voronoi regions contain each sample point. We will be computing this type of approximation. Analytic Boundary Discretize Sites Discretize Space Previous work Lavender92, Sheehy95, Vleugels 95 & 96, Teichmann97
11
Previous Work: Approximate Algorithms
Provide practical solutions but... Difficult to error-bound Restricted to static geometry Relatively slow These algorithms do provide practical solutions, but are either difficult to error-bound, restricted to static geometry, or are still relatively slow.
12
Our Goal Approximate generalized Voronoi diagram computation that is:
Simple to understand and implement Easily generalized Efficient and practical In this work, we tried to address some of the shortcomings of previous approaches. Our goal was to find an approximate algorithm that is simple to understand and implement, easily generalized in terms of site geometry, distance metrics, and dimension and that is efficient and practical with little or no precomputation (making it suitable for dynamic geometry). And finally, all sources of error must be fully enumerated and characterized. with all sources of error fully enumerated
13
Outline Basic Idea Generalized Voronoi Diagram Computation
Brute-force Algorithm Cone Drawing Graphics Hardware Acceleration Our Approach Basic Queries Applications Conclusion Our approach is based on a brute-force algorithm that is excessively slow, yet simple, general, and easy to error-bound. We will first describe the details of this approach, and then show an interesting relationship between cone intersections and Voronoi diagrams for points in 2D. We will then explain how to accelerate the brute-force approach for point sites by drawing cones using graphics hardware.
14
Brute-force Algorithm
Record ID of the closest site to each sample point The brute-force approach is very simple: We begin with a bounded region of space containing the Voronoi sites. We then point-sample the space and for each sample point, we compute distances to all sites and record the ID and distance of the closest site. This forms the volumetric approximations shown in the right two images. This approach is simple and very easy to generalize since it only requires the distance between a site and a sample point. In addition, the most dominant error results from the point-sampling density which is simple to bound. Coarse point-sampling result Finer point-sampling result
15
To visualize Voronoi diagram for points in 2D…
Cone Drawing To visualize Voronoi diagram for points in 2D… Perhaps the oldest way to visualize Voronoi diagrams for points in 2D came directly from Dirichlet and Voronoi. They noticed that if you align the apex of a right circular cone with point sites in the 2D plane, the minimum envelope of the cone intersections projected onto the plane would form the Voronoi diagram! This means that if we simply view the cones in different colors from the top with a parallel projection, we will directly render the Voronoi diagram! Equally interesting is that the depth value at a point in the the resulting image is equal to the distance to the closest site from that point! Perspective, 3/4 view Parallel, top view Dirichlet 1850 & Voronoi 1908
16
Graphics Hardware Acceleration
Simply rasterize the cones using graphics hardware Our 2-part discrete Voronoi diagram representation Color Buffer Depth Buffer We can accelerate this process by simply drawing the cones using standard graphics hardware. This approach was used by Paul Haeberli in SIGGRAPH ‘90 and by Mason Woo and others in the OpenGL Programming Guide. Their contribution was the inspiration for this work. As a result, we obtain a discrete Voronoi diagram in the form of two buffers: color which gives the ID of the closest site to each pixel sample, and depth which gives the associated distance. Since the cone drawing evaluates distances as depth, and the depth test performs a comparison and update to find the minimum, this is effectively performing the brute-force approach using graphics hardware! Site IDs Distance Haeberli90, Woo97
17
Outline Our Approach Generalized Voronoi Diagram Computation
Basic Idea Our Approach Meshing Distance Function Generalizations 3D Sources of Error Basic Queries Applications Conclusion I will now explain the details of our approach. The problem of generalized Voronoi diagram computation will be reduced to meshing the distance functions. This approach will be generalized to higher-order sites and varying distance metrics, and then extended to 3D. Finally, we will enumerate all sources of error.
18
The Distance Function Evaluate distance at each pixel for all sites Accelerate using graphics hardware Our approach, like the brute-force method, requires evaluation of a generalized distance function at each pixel sample point for all Voronoi sites. Our goal is to accelerate this evaluation using graphics hardware. Point Line Triangle
19
Approximating the Distance Function
Avoid per-pixel distance evaluation Point-sample the distance function Reconstruct by rendering polygonal mesh In order to avoid the per-pixel distance evaluation, we coarsely point-sample the distance function and reconstruct by rendering a polygonal mesh approximation. We emphasize constructing a mesh that is coarse enough to be rendered efficiently while having tight error bounds. Point Line Triangle
20
farthest distance a point can be from a pixel sample point
The Error Bound Error bound is determined by the pixel resolution farthest distance a point can be from a pixel sample point The error bound is determined by the pixel resolution. Basically, the error must be less than the farthest distance a point in space can be from a pixel sample point. Close-up of pixel grid
21
Meshing the Distance Function
We have reduced the Voronoi diagram computation problem to finding a coarse, but error-bounded, polygonal mesh approximation of the distance function for any desired site geometry. In the case of 2D points, this reduces to finding a bounded-error tessellation of the cone since the shape of the distance function for a point is a cone. Shape of distance function for a 2D point is a cone Need a bounded-error tessellation of the cone
22
Shape of Distance Functions
An intuitive way to find the shape of the distance functions for higher-order sites is to simply sweep a cone along the sites. Here we show the shape of the distance function for a line segment shown in green. Sweep apex of cone along higher-order site to obtain the shape of the distance function
23
Example Distance Meshes
One of our most important contributions is the development of specialized algorithms for constructing efficient error-bounded distance meshes for a wide variety of 2D primitives.
24
Curves Curves and other higher-order sites are handled by tessellating them into linear segments and then using their distance meshes. The tessellation error does not magnify the meshing error, it is only added, so we can easily adjust our error bound accordingly. Tessellate curve into a polyline Tessellation error is added to meshing error
25
Weighted and Farthest Distance
We can construct many common generalizations on the distance metric by simply applying a transformation to the nearest distance meshes. For example, weighted Voronoi diagrams are constructed by scaling the nearest distance meshes by their corresponding weights along the depth-axis, and farthest Voronoi diagrams are constructed by negating the nearest distance meshes along the depth-axis. These generalizations work for 3D Voronoi diagrams as well. Nearest Weighted Farthest
26
3D Voronoi Diagrams Graphics hardware can generate one 2D slice at a time In order to efficiently use the graphics hardware for constructing 3D Voronoi diagrams, we compute the volume one slice at a time. This animation shows the Voronoi diagram computed over a set of points in 3D. It is important to note that it may not always be necessary to compute the entire volume, and the slices do not need to be axis-aligned. We make these restrictions here just to simplify the explanations. Point sites
27
3D Voronoi Diagrams Each slice computation is similar to constructing Voronoi diagrams in 2D, except that in 3D the sites do not have to lie in the sampling plane. We must find a polygonal mesh approximation of a 2D planar slice of the 3D distance function. In the left animation, we show sample slices of the distance function for a point. The right animation shows the corresponding distance mesh approximations. Notice how the shape of the distance mesh varies with the distance between the site and the sampling plane. Slices of the distance function for a 3D point site Distance meshes used to approximate slices
28
3D Voronoi Diagrams Point Line segment Triangle
Constructing bounded-error distance meshes for 3D primitives has been our most difficult problem because of the nonlinearities of the distance function slices. We have developed several different specialized meshing algorithms for various 3D primitives, but we still consider this an area in need of further research. 1 sheet of a hyperboloid Elliptical cone Plane
29
3D Voronoi Diagrams Points and a triangle Polygonal model
These animations show examples of more complex 3D Voronoi diagrams computed using our approach: The left animation shows a diagram computed over several points and a triangle. The right animation shows the Voronoi diagram of a polygonal model of the Utah teapot. The slice colors represent the Voronoi regions of vertex, edge, and face features of the model. Only the face feature colors are shown on the model. Points and a triangle Polygonal model
30
Sources of Error Distance Error Meshing Tessellation
Hardware Precision Combinatorial Error Distance Pixel Resolution Z-buffer Precision Our error sources are divided into two broad categories: quantitative error in our distance evaluation and qualitative combinatorial error where a pixel is assigned the wrong color or an incorrect nearest-neighbor pair is found. Three sources contribute to distance error: error in our polygonal mesh approximation of the distance function tessellation error when approximating a higher-order curved site with linear elements. error resulting from the use of fixed precision arithmetic during rasterization. Three sources also contribute to combinatorial error: distance error (that we just described) resolution error resulting from point-sampling that is too coarse Z-buffer precision error
31
Zoom in to reduce resolution error...
Adaptive Resolution The most significant source of error results from low resolution point-sampling. This may cause some Voronoi regions to be missed entirely, or may result in incorrect nearest-neighbor pairs. We can reduce the potential resolution error by zooming in only on regions of interest using simple tranformations in the graphics hardware. The error scales as well since we are increasing the sampling density, so we must adjust the error bound as we zoom. [ start animation ] Zoom in to reduce resolution error...
32
Outline Basic Queries Generalized Voronoi Diagram Computation
Basic Idea Our Approach Basic Queries Nearest Site Boundary Finding Nearest-Neighbor Finding Maximally Clear Point Applications Conclusion Our Voronoi diagram representation is in the form of a site ID and a distance buffer. In order to demonstrate its usefulness, we must be able to perform some basic queries efficiently.
33
Table lookup on query point
Nearest Site Table lookup on query point The color of the pixel closest to a query point is the ID of the nearest site. We can even find the distance to this site by using a table lookup into the depth buffer.
34
Boundary Finding Isosurface extraction : boundary walking
Offset difference image to mark boundary pixels Because of our error-bounded distance evaluation, we assume that the true boundary is located near pixels whose neighbors have different colors. We can use isosurface extraction methods or offset difference images to find boundary points.
35
Nearest-Neighbor Finding
Which colors touch in the image? Walk the boundaries (like boundary finding) All sites whose Voronoi regions share a boundary are nearest neighbors, so the problem reduces to finding which colors touch in the image. We can find this information by using the boundary finding techniques. This query seems to be difficult to accelerate using graphic hardware.
36
Point with the largest depth value (greatest distance)
Maximally Clear Point Point with the largest depth value (greatest distance) We know that the Voronoi boundaries form the maximally clear paths around the sites. Another interesting query is to find the point within our bounded region that is maximally clear of all sites. This is often called the toxic waste dump problem. We can find this point simply by finding the pixel with the largest depth value. This point will either be along a Voronoi boundary or along the border of our bounded region.
37
Outline Applications Generalized Voronoi Diagram Computation
Basic Idea Our Approach Basic Operations Applications Motion Planning Medial Axis Computation Dynamic Mosaics Conclusion We will now describe several applications of our approach.
38
Real-time Motion Planning : Static Scene
The classic problem in robot motion planning is called the Piano Mover’s problem. The goal is to automatically plan the motion of the piano around the obstacles from a starting position to some end position. [ start left animation, wait ] We use a simple potential field based motion planner using the distance buffer representation of the Voronoi diagram. Here is an overhead view. Notice how the piano is attracted to the Voronoi boundaries. [ start right animation ] We are planning through a model of Fred Brooks’s house composed of over 100,000 triangles. Normally the potential field is precomputed, but we use our fast Voronoi computation to calculate it at interactive rates. Plan motion of piano (arrow) through 100K triangle model Distance buffer of floorplan used as potential field
39
Real-time Motion Planning : Dynamic Scene
We also show motion planning through a dynamic version of the house. In these animations we are planning the motion of a music stand around moving furniture starting at the top of the image and proceeding to the bottom. [ start left animation ] Here is an overhead view that also shows the dynamic distance computation. [ start right animation ] This motion planning sequence was also computed at interactive rates. Plan motion of music stand around moving furniture Distance buffer of floor-plan used as potential field
40
Medial Axis Computation
The Voronoi regions of a per-feature Voronoi diagram are the set of points that are closest to a particular feature of a site. The Voronoi boundaries that are inside the polygon are commonly referred to as medial axis of the polygon. The medial axis forms the skeleton of an object giving a simple description of a complex object contour. This alternative representation is often used in shape analysis and pattern recognition. Per-feature Voronoi diagram Per-feature-color distance mesh Internal Voronoi diagram
41
Static mosaics by Paul Haeberli in SIGGRAPH ‘90
Dynamic Mosaics 1000 moving points Our final application was mostly just for fun. A common way to generate mosaic tilings is based on Voronoi-like cell structures. We use the location of a scattering of point sites to index into a texture map. The texture colors are then used to color the Voronoi regions of the points. Ordinary Voronoi diagrams based on cone drawing have been used to generate static mosaic tilings by Paul Haeberli in SIGGRAPH ‘90. We show the speed of our approach by generating dynamic mosaics where the Voronoi sites are allowed to move over a static source image. We could also have a static Voronoi diagram over a video stream. Source image Dynamic Mosaic Tiling Static mosaics by Paul Haeberli in SIGGRAPH ‘90
42
Outline Conclusion Generalized Voronoi Diagram Computation Basic Idea
Our Approach Basic Operations Applications Conclusion Now we will briefly summarize our main contributions.
43
+ Conclusion Meshing Distance Functions Graphics Hardware Acceleration
Brute-force Approach + Fast and Simple, Approximate Generalized Voronoi Diagrams Bounded Error By reducing the problem to meshing the distance functions, and by rendering the distance meshes using graphics hardware to accelerate a brute-force approach, we obtained a fast and simple way to compute approximate generalized Voronoi diagrams with bounded error. In addition, we showed how to perform many of the basic queries on Voronoi diagrams efficiently, and demonstrated its effectiveness in several applications.
44
Future Work Improve distance meshing for 3D primitives
More applications Motion planning with more degrees of freedom Accelerate exact Voronoi diagram computation Surface reconstruction Medical imaging: segmentation and registration Finite-element mesh generation By reducing the problem to meshing the distance functions, and by rendering the distance meshes using graphics hardware to accelerate a brute-force approach, we obtained a fast and simple way to compute approximate generalized Voronoi diagrams with bounded error. In addition, we showed how to perform many of the basic queries on Voronoi diagrams efficiently, and demonstrated its effectiveness in several applications.
45
Berkeley Walkthrough Group
Acknowledgements Sarah Hoff Chris Weigle Stefan Gottschalk Mark Peercy UNC Computer Science SGI Advanced Graphics Berkeley Walkthrough Group I would like to thank these people for their contributions throughout this work.
46
Acknowledgements Army Research Office National Institute of Health
National Science Foundation Office of Naval Research Intel I would also like to thank our funding sources.
47
Live Demo... I would also like to thank our funding sources.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.