Digital: The Third Annual Video Review of Computational Geometry
Digital: The Third Annual Video Review of Computational Geometry
SRC
Research
Report
133a
digi tal
Systems Research Center
130 Lytton Avenue
Palo Alto, California 94301
Author Affiliation
John Hershberger is currently employed by Mentor Graphics. He can be reached at
jeh@wv.mentorg.com.
Abstract
Computational geometry concepts are often easiest to understand visually, in terms
of the geometric objects they manipulate. Indeed, most papers in the field rely on
diagrams to communicate the intuition behind their results. However, static figures
are not always adequate.
The accompanying videotape showcases advances in the use of algorithm animation, visualization, and interactive computing in the study of computational geometry. This report contains brief descriptions of all the segments of the videotape.
This report is the third annual Video Review of Computational Geometry to be
published as a SRC Research Report. The 92 Video Review is SRC Research Report 87, and the 93 Video Review is SRC Research Report 101. Future editions
will be published by the ACM, as part of the proceedings of the annual ACM Symposium on Computational Geometry.
Preface
Computational geometry concepts are often easiest to understand visually. Indeed,
most papers in computational geometry rely on diagrams to communicate the intuition behind their results. However, static figures are not always adequate to describe geometric algorithms, since algorithms are inherently dynamic. The accompanying videotape showcases advances in the use of algorithm animation, visualization, and interactive computing in the study of computational geometry.
This report contains short descriptions of the eight segments in the videotape.
The first three segments are animations of two-dimensional algorithms: a polygonal
approximation algorithm from cartography, an algorithm for computing the rectangle discrepancy, and a fixed-radius neighbor-searching algorithm. The fourth segment presents the GASP system for animating geometric algorithms in two or three
dimensions; GASP is used by two other segments in the review. The remaining
segments illustrate algorithms and concepts in three or more dimensions: the fifth
segment explores the relationship between penumbral shadows in three dimensions
and four-dimensional polytopes; the final three segments show three-dimensional
algorithms for interactive collision detection, polyhedral separators, and interactive
display of alpha hulls.
This report and the accompanying videotape comprise the Third Annual Video
Review of Computational Geometry. In the three years since the Video Review was
introduced, it has become an established part of the annual ACM Symposium on
Computational Geometry. The 1995 Video Review and future editions will be distributed by the ACM as part of the conference proceedings.
We thank Bob Taylor, director of the Systems Research Center, for his support
in establishing the annual Video Review. The 92 Video Review is available as SRC
Research Report 87, and the 93 Video Review as SRC Research Report 101. These
reports (written guides and videotapes) are available by sending electronic mail to
src-report@pa.dec.com.
Finally, we thank the members of the 1994 Video Program Committee for their
help in evaluating the entries. The members of the committee were Marshall Bern
(Xerox PARC), Marc Brown (Digital Equipment Corporations Systems Research
Center), Leo Guibas (Stanford University), John Hershberger (Mentor Graphics),
Jim Ruppert (NASA Ames), and Jenny Zhao (Silicon Graphics).
Marc H. Brown
John Hershberger
Video Review Co-Chairs
Table of Contents
Starting
Time
2:17
7:15
Page
1
14:38
22:29
11
30:42
Penumbral Shadows
Adrian Mariano and Linus Upson
18
33:54
20
40:36
25
48:26
29
Jack Snoeyink
Mentor Graphics
1001 Ridder Park Drive
San Jose, CA 95131
1
The line simplification problem is as follows: Given a sequence of vertices that
make up a polygonal chain, find a subsequence of the vertices that approximates
the chain. The accompanying videotape shows two algorithms for solving the line
simplification problem.
Introduction
An important task of the cartographers art is to extract features from detailed data
and represent them on a simple and readable map. As computers become increasingly involved in automated cartography, efficient algorithms are needed for the
tasks of extraction and simplification. Cartographers [1, 6] have identified the line
simplification problem as an important part of representing linear features. Given
a polygonal chain, a sequence of vertices V = v0 ; v1 ; : : : ; vn , the problem is to
find a subsequence of vertices that approximates the chain V . We assume that the
input chain V has no self-intersections (but not the output).
In 1973, Douglas and Peucker (now Poiker) [3] published a simple recursive
simplification method in the cartography literature that has become the favorite of
many [5, 10]. This method has been independently proposed in other contexts such
Method
Algorithms
The two implementations differ in the way they find vf , the farthest vertex from
v0 vn.
1
!
The straightforward approach measures distance fromv0 vn for each vertex and
takes the maximum. Thus, the running time of this algorithm will satisfy a quicksortlike recurrence, with best case (n log n). Since geometry determines the farthest
vertex, the worst-case running time is (n2 ). One cannot use linear-time median
finding or randomization to improve the running time. (If one assumes that the input data is such that farthest vertices are found near the middle of chains, then one
expects O (n log n) behavior.)
The second implementation uses a path hull data structure [2, 4] to maintain a
dynamic convex hull of the polygonal chain V . Using Melkmans convex hull algorithm [7], we compute two convex hulls from the middle of the chain outward.
We can find a farthest vertex vf from a line by locating two extreme points on each
hull using binary search. When we split V at vertex vf , we undo one of the hull
computations to obtain the hull from the middle to vf , recursively approximate
the subchain containing the middle, then build hulls for the other subchain and recursively approximate it. One can use a simple credit argument to show that the
total time taken by the algorithm is O (n log n). The best case can even be linear, if
all the hulls are small and splits occur at the ends.
Unfortunately for us, the statistical properties of cartographic data usually mean
that the straightforward implementation is slightly faster than the path hull implementation. Since the variance of the running time of the path hull implementation
is smaller, it may be interesting for parallel or interactive applications.
Technical Details
The programs were run on a Silicon Graphics Crimson in the GraFiC lab at UBC
and output was recorded to video in real time.
Acknowledgments
Scott Andrews extracted the data of the coastline of British Columbia from the Digital Chart of the World. NSERC and the B.C. Advanced Systems Institute supported
the work on this video. DEC Systems Research Center has also provided partial
support for the research.
References
[1] B. Buttenfield. Treatment of the cartographic line. Cartographica, 22:126,
1985.
[2] D. Dobkin, L. Guibas, J. Hershberger, and J. Snoeyink. An efficient algorithm
for finding the CSG representation of a simple polygon. Algorithmica, 10:1
23, 1993.
[3] D. H. Douglas and T. K. Peucker. Algorithms for the reduction of the number
of points required to represent a line or its caricature. The Canadian Cartographer, 10(2):112122, 1973.
[4] J. Hershberger and J. Snoeyink. Speeding up the Douglas-Peucker line simplification algorithm. In Proc. 5th Intl. Symp. Spatial Data Handling, pages
134143. IGU Commission on GIS, 1992.
[5] R. B. McMaster. A statistical analysis of mathematical measures for linear
simplification. Amer. Cartog., 13:103116, 1986.
[6] R. B. McMaster. Automated line generalization. Cartographica, 24(2):74
111, 1987.
[7] A. A. Melkman. On-line construction of the convex hull of a simple polyline.
Info. Proc. Let., 25:1112, 1987.
[8] U. Ramer. An iterative procedure for the polygonal approximation of plane
curves. Comp. Vis. Graph. Image Proc., 1:244256, 1972.
[9] G. Rote. Quadratic convergence of the sandwich algorithm for approximating
convex functions and convex figures in the plane. In Proc. 2nd Can. Conf.
Comp. Geom., pages 120124, Ottawa, Ontario, 1990.
[10] E. R. White. Assessment of line-generalization algorithms using characteristic
points. Amer. Cartog., 12(1):1727, 1985.
2
Supersampling is one of the most general ways of attacking the problem of antialiasing in computer graphics. In this approach, a picture is sampled at a very high rate,
and then resampled by averaging supersamples within the pixel area to compute the
pixel value. Ray tracing, a common technique used to produce realistic images of
computer modeled scenes, is another instance of supersampling. Discrepancy theory provides a measure of the quality of the sampling patterns. The rectangle discrepancy in particular gives a good measure of how well a sample pattern, when
applied to the area of one or more pixels, captures small details in the picture. The
accompanying videotape shows an animation of an algorithm we have developed
[2] for computing the rectangle discrepancy of a two-dimensional point set. In
particular, this algorithm can be used to find sampling sets with very low rectangle
discrepancy. Interestingly the problem of computing the rectangle discrepancy also
arises in the context of learning theory [4].
Definitions
Let us consider a point set in the unit square. Let be the set of all rectangles in
the unit square with edges parallel to the two axes. For an axis-oriented rectangle
A (A ), we define the function
2F
In(A) = jA \ Xj
Dl .
2 F is
D(A) = jIn(A)=jXj
Area(A)j
X is
MaxD(X ) = maxA (D(A))
We also define the following simpler functions for A 2 F
Dl (A) = In(A)=jXj Area(A)
The maximum rectangle discrepancy of the set
2F
and
Do(A) = Area(A)
In(A)=jXj
X
D
jXj
jXj
DX
Videotape Contents
We explain the main idea of the algorithm in a series of simple lemmata. First we
show that we have to consider at most O ( 4 ) rectangles, more specifically the
ones that have all their edges pass through a point in .
This allows us to study pairs of points in in . For each such pair we find
the rectangle that maximizes l over all rectangles with horizontal edges that pass
through the points of the given pair.
This problem is much easier now because we know the y coordinates of the
rectangle. Assuming that the two points are pb ; pt (pb (y ) < pt (y )), and the height
of the rectangle is dy , (dy = pt (y ) pb (y )) we have to find the following maximum
jXj
maxA
(In(A)=jXj
dxA dy)
where Fij is the set of rectangles that pass through points pb and pt , and dxA is the
width of A. If we eliminate the points in X that either lie above the top y coordinate
of the rectangle or below the lower y coordinate, this becomes a one-dimensional
problem. We project the points on the x axis and obtain a new set X of one-dimensional
2Fij
maxA
;1];pb(x) A (In(A)=jX
2[0
Length(A))
We can reduce this problem to the problem of computing the halfspace discrepancy
of one-dimensional point sets, a simpler problem studied in [1]. Here we want to
find the anchored interval that maximizes
maxA=[0;zi] (i=jZj zi )
for a given one-dimensional set Z = fz1 : : : zn g with 0 zi < zi+1 1.
This
is a linear function of the rank and the coordinate of the point. To solve it we find
the convex hull of the set (z1 ; 1) : : : (zn ; n) and find the maximum with a binary
search. From this maximum we obtain the solution to the original maximization
problem.
In this way we compute the maximum rectangle for all pairs of points. Clearly
the rectangle that maximizes l is the maximum of these O ( 2 ) rectangles.
Finally, we show how to use the dynamic data structure of [5] to solve a sequence of one-dimensional problems efficiently. With the use of this technique we
can maintain the convex hull at a cost of O (log2
) time per insertion. This in
turn allows us to find the maximum rectangle for each pair of points in O (log 2
)
time, and yields the final running time of O ( 2 log2
).
jXj
jXj
jXj
jXj
jXj
Technical Details
The accompanying videotape was prepared in the Computer Science Department
at Princeton University. The implementation of the algorithm was written in C, to
run under UNIX on a Silicon Graphics Iris workstation. The animation was created
with the animation system GASP that Ayellet Tal and David Dobkin are developing
in this department [3]. Recording was done at the Interactive Computer Graphics
Lab at Princeton and editing was done with the assistance of the Department of Media Services at Princeton.
Acknowledgments
This work supported in part by the National Science Foundation under Grant Number CCR93-01254 and by The Geometry Center, University of Minnesota, an STC
funded by NSF, DOE, and Minnesota Technology, Inc.
References
[1] D.P. Dobkin and D. Eppstein, Computing the Discrepancy. Proceedings of the
Ninth Annual Symposium on Computational Geometry, (1993).
[2] D.P. Dobkin and D. Gunopulos, Computing the Rectangle Discrepancy. Princeton University Technical Report 443-94.
[3] D.P. Dobkin and A. Tal, GASP A System to Facilitate Animating Geometric Algorithms. Third Annual Video Review of Computational Geometry, to appear, (1994)
[4] W. Maass, Efficient Agnostic PAC-Learning with Simple Hypotheses. Submitted to COLT 94.
[5] M. Overmars and J. van Leeuwen, Maintenance of Configurations in the Plane.
J. Comput. Sys. Sci. 23 (1981) 166-204.
3
A fixed-radius all-nearest neighbors problem takes as input a set S of n points and
a real number , and reports all pairs of points that are at distance at most . The
accompanying videotape shows an animation of an algorithm, developed by the authors [2], for solving the fixed-radius all-nearest neighbors problem.
The Algorithm
The algorithm depicted in the videotape works in two stages. In the first stage, a
grid is computed. Instead of a standard grid, we use a so-called degraded grid that
is easier to construct by means of a simple sweep algorithm. This degraded grid
consists of boxes with sides of length at least . If a box contains points of S , then
its sides are of length exactly . In the second stage, this grid is used for the actual
enumeration. For each non-empty box, it suffices to compare each of its points with
all points in the same box or in one of the neighboring boxes. Although the algorithm may compare many pairs having distance more than , it can be shown that
the total number of pairs considered is proportional to the number of pairs that are
at most apart. As a result, the total running time of the algorithm is proportional
to n log n plus the number of pairs that are at distance at most .
As an application, we give an animation of the algorithm of Heiden et al. [1] for
triangulating the contact surface of a molecule. In a first step, points on this surface
are computed. Given these points, we compute all pairs that are at distance at most
3
for a suitable choice of . This gives for each point a neighbor list containing all
points that are at distance at most from it. Given these lists, we can triangulate
the surface incrementally: An edge of the current triangulation is called an outer
edge, if it belongs to only one triangle. All outer edges are maintained in a queue.
With each edge, we store a so-called common neighbor list, which is the intersection
of the two neighbor lists of the points belonging to this edge. We start with any
triangle. Its edges and their common neighbor lists are inserted into the queue. As
long as the queue is non-empty, we do the following: We take any edge from the
queue and look at all points in its common neighbor list. Each such point defines a
triangle with the current edge. We take that point defining the smallest triangle. This
triangle becomes part of the triangulation and we update the queue appropriately.
Technical Details
The video was produced at the Max-Planck-Institute for Computer Science, using
Silicon Graphics Indy and Indigo2 machines, and using Showcase and Geomview1.1 software. We thank Roland Berberich, Jack Hazboun, Dirk Louis and Peter
Muller for their help in producing this video.
Acknowledgments
This work was supported by the ESPRIT Basic Research Actions Program, under
contract No. 7141 (project ALCOM II).
References
[1] W. Heiden, M. Schlenkrich and J. Brickmann. Triangulation algorithms for the
representation of molecular surface properties. J. Comp. Aided Mol. Des. 4
(1990), pp. 255-269.
[2] H.P. Lenhof and M. Smid. Enumerating the k closest pairs optimally. Proceedings FOCS 1992, pp. 380-386.
10
4
The accompanying videotape shows five algorithm animations that have been developed using GASP. The GASP system is noteworthy because it is very easy for a
user without any knowledge of computer graphics to create an animation of a geometric algorithm quickly.
Overview
The GASP system helps in the creation and viewing of animations for geometric
algorithms. The user need not have any knowledge of computer graphics in order
to quickly generate an animation. GASP allows the fast prototyping of algorithm
animations. A typical animation can be produced in a matter of days or even hours.
Even highly complex geometric algorithms can be animated with ease. The system
is also intended to facilitate the task of implementing and debugging geometric algorithms.
The applications code specifies only the structure of the animation (which building blocks are included), and the structure of each scene (e.g., the position of the
objects). The user need not be concerned with the way the animation appears on
the screen. If the user wishes to influence the look of the animation and not only
its structure, he can edit an ASCII Style File which controls viewing aspects of
the animation. Even when the user changes the style file, the user needs no specific
11
Videotape Contents
This video shows five examples of GASP in action. These examples were chosen
to give a sense of the range of possible applications of GASP. In addition, two other
videos [1], [3] that use our system appear in this collection of animations.
12
13
The following is part of the style file for the above animation. The style file
determines the following aspects of the animation. The background color is light
gray. The colors to be chosen by GASP are colors which fit the creation of a video
(rather than the screen). Each atomic unit spans 10 frames. Rotation of the world is
done 380 degrees around the Y axis, and it is executed over 160 frames, instead of
over 10. The color of the stick which fades in during atomic unit stick0 is red.
(Similarly, the style file includes colors for the other sticks.)
14
begin_global_style
background = 0.9 0.9 0.9;
color = VIDEO;
frames = 10;
end_global_style
begin_unit_style Rotate
frames = 160;
rotation_world = Y 380.0;
end_unit_style
begin_unit_style stick0
color = 0.625 0.273475 0.273475;
end_unit_style
15
Clip 5: Heapsort
The last clip animates heapsort. The colored rods have lengths to be sorted. We first
display the initial creation of the heap. Next, simple motions are used to control
the repeated operations of removing the largest element, and reheaping. Heapsort
is given as an example of using GASP to facilitate the animation of any algorithm
that involves the display of three dimensional geometries.
Technical Details
This video was prepared in the Computer Science Department at Princeton University. The programs were written in C to run under UNIX on a Silicon Graphics
Iris. Recording was done at the Interactive Computer Graphics Lab at Princeton
and editing was done with the assistance of the Princeton Department of Media Services.
16
Acknowledgments
We thank Kirk Alexander and Mike Mills for their help in producing the final video.
This work supported in part by the National Science Foundation under Grant Number CCR93-01254 and by The Geometry Center, University of Minnesota, an STC
funded by NSF, DOE, and Minnesota Technology, Inc.
References
[1] H. Bronnimann. Almost optimal polyhedral separators. In The Third Annual
Video Review of Computational Geometry, 1994.
[2] B. Chazelle and H. Edelsbrunner. An optimal algorithm for intersecting line
segments in the plane. Journal of the ACM, 39(1):154, 1992.
[3] D. Dobkin and D. Gunopulos. Computing the rectangle discrepancy. In The
Third Annual Video Review of Computational Geometry, 1994.
[4] D. Dobkin and D. Kirkpatrick. Fast detection of polyhedral intersections.
Journal of Algorithms, 6:381392, 1985.
[5] D. Dobkin and D. Kirkpatrick. Determining the separation of preprocessed
polyhedra a unified approach. ICALP, pages 400413, 1990.
[6] D. Dobkin and A. Tal. Building and using polyhedral hierarchies (video). In
The Ninth Annual ACM Symposium on Computational Geometry, page 394,
May 1993.
[7] H. Rohnert. Moving a disc between polygons. Algorithmica, 6:182191,
1991.
[8] S. Schirra. Moving a disc between polygons (video). In The Ninth Annual
ACM Symposium on Computational Geometry, pages 395396, May 1993.
[9] J. Snoeyink. Objects that cannot be taken apart with two hands (video). In
The Ninth Annual ACM Symposium on Computational Geometry, page 405,
May 1993.
[10] J. Snoeyink and J. Stolfi. Objects that cannot be taken apart with two hands. In
The Ninth Annual ACM Symposium on Computational Geometry, pages 247
256, May 1993.
17
Penumbral Shadows
Adrian Mariano
Linus Upson
NeXT
900 Chesapeake Drive
Redwood City, CA 94063
5
The shadows cast by polygonal occluding objects illuminated by polygonal light
sources are complicated. Unlike shadows cast by point sources, they are divided
into regions where the shadow intensity changes at different rates. The boundaries
between these different regions form the shadow diagram.
The accompanying videotape depicts shadows cast by a square light source with
a square occluding object. We have included two types of images: flat shadow
scenes and perspective views. The flat shadow images were calculated using the
exact formula for radiative energy transfer. This calculation depends only on the
boundary of the visible light source. For polygons, it can be reduced to a simple
summation [1].
Finding the boundary of the visible portion of the illuminating polygon when it
is occluded by a second polygon requires computing the intersection of two polygons. General purpose algorithms for computing intersections of arbitrary polygons
in the plane are quite complicated, so we used the SutherlandHodgman algorithm,
which cannot handle concave polygons, but which is much simpler than the fully
general methods [2]. We created the three-dimensional perspective views from the
flat images using the texture mapping capabilities of Rayshade.
The shadow diagrams can be obtained by projecting the edges or vertices of the
light source through vertices or edges of the occluder onto the plane of the shadow.
The video illustrates that when a square occluding object is illuminated by a square
light source, the shadow diagram is a projection of a four-dimensional hypercube.
18
In general, the shadow diagrams for an arbitrary light source and occluder can
be seen as projections of four-dimensional polytopes by considering the lines which
intersect the plane of the shadow. Let S be the plane of the shadow and let P be a
different plane parallel to S . If a line intersects S at the point (xs ; ys ) and it intersects P at the point (xp ; yp ) then the line can be mapped to a point (xs ; ys ; xp ; yp )
in R4 . Now let D be the set of all lines which intersect both the light source and the
occluder. When D is mapped into R4 , the result is a four-dimensional polytope.
If this polytope is projected into R2 by discarding the last two coordinates of each
point, the shadow diagram results. Because P can be changed, this construction
describes a particular shadow diagram as the projections of any one of a family of
polytopes.
References
[1] Hottel and Sarofim. Radiative Transfer. McGraw Hill, New York. 1967.
[2] Vatti, Bala. A Generic Solution to Polygon Clipping. Communications of the
ACM, July 1992.
[3] Teller, Seth. Computing the Antipenumbra of an Area Light Source. SIGGRAPH 92 Conference Proceedings, July 1992.
19
Ming C. Lin
Computer Science Department
Naval Postgraduate School
Monterey, CA 93943
6
The accompanying videotape demonstrates algorithms for collision detection in largescaled, interactive environments. Such environments are characterized by the number of objects undergoing rigid motion and the complexity of the models. The algorithms do not assume that the motions of the objects are expressible as closed form
functions of time, nor do they assume any upper bounds on their velocities.
Background
Over the last few years, a great deal of interest has been generated in virtual or
synthetic environments, such as architectural walkthroughs, visual simulation systems for designing the shapes of mechanical parts, training systems, etc. Interactive, large-scaled virtual environments pose new challenges to the collision detection problem, because they require performance at interactive rates for thousands
of pairwise intersection tests [1].
Our algorithms use a two-level hierarchical detection test for each model to selectively compute the precise contact between objects, achieving real-time performance without compromising accuracy. At the top level, we use a dimension reduc-
20
21
6
which share this constraint plane in their Voronoi regions. If a point P on object
A lies inside the Voronoi region of the feature fB on object B , then fB is a closest
feature to the point P .
Our method is straightforward. We start with a candidate pair of features, one
from each polytope, and check whether the closest points lie on these features. Since
the polytopes and their faces are convex, this is a local test involving only the neighboring features of the current candidate features. If either feature fails the test, we
step to a neighboring feature of one or both candidates, and try again. With some
simple preprocessing, we can guarantee that every feature has a constant number of
neighboring features. This is how we can verify or update the closest feature pair in
expected constant time. Fig. 5 shows how this algorithm works on a pair of simple
convex polytopes.
22
Video Contents
We have successfully demonstrated the algorithm in an architectural walkthrough
environment and a multi-body simulation system. For simulations consisting of
thousands of models, the overall algorithm has exhibited linear time performance
in practice.
We first demonstrate how the polytope collision detection algorithm [2] tracks
the closest features between two convex polytopes in real time. We maintain and
update the closest features using the Voronoi regions of the polytopes. Since the
polytopes move only slightly between the frames, the temporal and geometric coherence is well preserved. Thus, the expected running time of this algorithm is constant, independent of the complexity of the polytopes.
This is followed by demonstrating the algorithm on an articulated body, namely
a hand, represented by the union of multiple convex polytopes. To demonstrate the
efficiency of the algorithm and effectiveness of the coherence, we keep track of all
pairs of closest features between each finger and the nearby objects. However, using
a subpart hierarchical tree representation as in [2] can eliminate the unnecessary
computation.
The over all collision detection algorithm is tested on a walkthrough and a multibody dynamic simulation environment. The video footage of walkthrough was taken
from a users actual walkthrough experience. The collision detection algorithm
performs very well in large environments composed of hundreds of polytopes. The
kitchen, like most realistic environments, is fairly static; therefore, we can sort the
bounding boxes of the polytopes in sub-linear time at each instance (this requires a
modified sorting algorithm which sorts only the moving objects). We see very little
degradation of frame rate when we add the capability of collision detection to our
walkthrough environment.
We further demonstrate a multi-body simulation with several complex objects
in a moderately dense environment. The objects are placed in a bounded 3-dimensional
simulation volume whose walls act as barriers. Unlike the walkthrough environment, all the objects move independently. The dynamics of multi-body simulation
assumes elastic collision. In order to show the asymptotic time bound on the algorithm, we increase the number of possible interactions quadratically, but the frame
time using our collision detection algorithm increases only linearly.
23
Acknowledgments
We are grateful to Dr. Fred Brooks and the walkthrough group at UNC Chapel Hill
for the model of the kitchen.
D. Manocha was supported in part by a Junior Faculty Award and ARPA Contract #DAEA 18-90-C-0044.
References
[1] J. Cohen, M. Lin, D. Manocha, and K. Ponamgi. Interactive and exact collision
detection for large-scaled environments. Technical Report TR94-005, Department of Computer Science, University of North Carolina, 1994.
[2] M. C. Lin. Efficient Collision Detection for Animation and Robotics. PhD thesis, University of California at Berkeley, December 1993. Department of Electrical Engineering and Computer Science.
24
7
The accompanying videotape illustrates two deterministic polynomial time methods
for finding a separator for two nested convex polyhedra in 3-dimensions.
1 Introduction
Let Q
P be two convex polyhedra in IR3 . The problem of finding a separating
convex polyhedron between P and Q with as few facets as possible is believed to be
NP-hard [2], but one can find good approximations for it. Mitchell and Suri [4] cast
the problem as a set cover problem. Let
= (Q) denote the set of supporting
hyperplanes of Q. Let the cover set system be ( ;
p : p @P ), where, for any
point p, p consists of those hyperplanes in for which p and Q lie on opposite
sides. They show that a hitting set for the cover set system gives a subset of facets
of Q whose supporting halfspaces define a polytope whose boundary lies between
Q and P .
A polytope Q0 between Q and P such that each facet of Q0 is supported by a
facet of Q is called canonical. The smallest (with respect to the number of facets)
canonical polytope contained in P can be obtained from a minimal hitting set of this
set system and is within 3 times the optimal separating polyhedron (in the number
of faces). Therefore, in this video, we just show how to obtain an optimal canonical
separator.
H H
H fH
H
25
Video Contents
j j
26
Technical Details
Both algorithms are implemented and animated using GASP, a Geometric Animation System created at Princeton University by Ayellet Tal and David Dobkin [3].
The implementation is written in C and runs on a Silicon Graphics Iris workstation.
The algorithm is fully animated, in the sense that it produces an animation for any
given data P and Q. The data used for the video were created with a random generator of planes tangent to the sphere, then intersected to obtain Q, which was blown
up to yield P .
Acknowledgments
We would like to thank Ayellet Tal and David Dobkin for the customized GASP environment and their invaluable help. Thanks also go to Kirk Alexander and Kevin
Perry, of Interactive Computer Graphics Lab at Princeton University and Mike Mills,
of the Princeton Department of Media Services.
The author was supported in part by NSF Grant CCR-93-01254, the Geometry Center, University of Minnesota, an STC funded by NSF, DOE, and Minnesota
Technology Inc., and Ecole Normale Superieure of Paris.
References
[1] H. Bronnimann and M. T. Goodrich. Almost optimal set covers in finite VCdimension. In Proc. 10th ACM Sympos. Computational Geometry, pages 293
302, 1994.
[2] G. Das. Approximation schemes in computational geometry. Ph.D. thesis, University of Wisconsin, 1990.
[3] D. P. Dobkin and A. Tal. GASPa system to facilitate animating geometric
algorithms (Video). These proceedings.
[4] J. S. B. Mitchell and S. Suri. Separation and approximation of polyhedral surfaces. In Proc. 3rd ACM-SIAM Sympos. Discrete Algorithms, pages 296306,
1992.
28
8
The accompanying videotape shows an interactive visualization of weighted threedimensional -hulls for static and dynamic spheres. The -hull is analytically computed and represented by a triangulated mesh. The entire surface is computed and
displayed in real-time at interactive rates. The weighted three-dimensional -hulls
are equivalent to smooth molecular surfaces of biochemistry. Biochemistry applications of interactive computation and display of -hulls or smooth molecular surfaces are outlined.
Introduction
The -hull has been defined as a generalization of the convex hull of point-sets by
Edelsbrunner, Kirkpatrick, and Seidel [3, 4]. Given a set of points P , a ball b of
radius is defined as an empty -ball if b P = . For 0
, the hull of P is defined as the complement of the union of all empty -balls [3]. It has
been shown that it is possible to compute the -hull of a set of points P from the
Voronoi diagram of P . For =
the -hull over the set of points P is the same
as their convex hull. Edelsbrunner and Mucke [5] have defined the -shape over
P to be the polytope that approximates the -hull over P by replacing circular arcs
29
1
8
of the -hull by straight edges and spherical caps by triangles. An -shape of a set
of points P is a subset of the Delaunay triangulation of P . Edelsbrunner [3] has
extended the concept of -shapes to deal with weighted points (i.e. spheres with
possibly unequal radii) in three dimensions. An -shape of a set of weighted points
Pw is a subset of the regular triangulation of Pw .
The smooth molecular surface of a molecule is defined as the surface which an
exterior probe-sphere touches as it is rolled over the spherical atoms of that molecule.
This definition of a molecular surface was first proposed by Richards [7]. This surface is useful in studying the structure and interactions of proteins, in particular for
attacking the protein-substrate docking problem. The analytic computation of the
molecular surface was first done by Connolly [2].
Looking at the above definitions, one can see that the weighted -hulls for three
dimensions and the smooth molecular surface of a molecule with a probe-radius
have the same definitions. In this video we present the visualization of weighted
-hulls as used to define molecular surfaces.
Our Approach
Computation of -hulls and -shapes has traditionally been done by first constructing power diagrams or regular triangulations. Since these methods involve computing the entire diagram or triangulation first and then culling away the parts that are
not required, their complexity is O (n2 ) in time, where n is the number of points.
This is worst-case optimal, since an -shape in three dimensions could have a complexity of
(n2 ).
However, when -hulls are used as molecular surfaces, one can do better. Let
M = S1 ; : : : ; Sn , be a set of spheres, where each sphere, Si , is expressed as a
pair (ci ; ri ), ci being the center of the sphere and ri being the radius of the sphere.
Collections of spheres representing molecules have two interesting properties: (i)
the minimum distance dij between any two centers ci and cj is greater than or equal
to a positive constant lmin the smallest bond-length in the molecule and (ii) the
values of all the radii can be bounded from above and below by strictly positive
values, 0 < rmin
ri rmax . We take advantage of the first property to arrive
at better running times for our algorithm. Stated simply, the first property says that
the number of neighboring atoms within a fixed distance from any atom i, is always
bounded from above by a constant kmax that depends on the minimum spacing between any two atoms. We refer to two atoms i and j as neighboring if it is possible
to place a probe sphere such that it is contact with both Si and Sj .
30
31
8
k is around 45.
of 1:4A,
In the algorithms for computing the convex hull of a set of points, it is assumed
that the points are in a general position, i.e. no more than d points lie on the same
d 1 dimensional hyperplane. In reality this assumption often fails to hold, leading
to problems. For example, planar benzene rings occur often in proteins, causing six
carbon and six hydrogen atoms to be all coplanar. One of the recent approaches to
solving this problem has been to perturb the input point set slightly to avoid these
degeneracies. The approach of Emiris and Canny [6] perturbs the j th dimension of
the ith point as:
(1)
where is a symbolic infinitesimal and q is the smallest prime greater than n. Instead of performing exact integer arithmetic, we just perturb the centers of the spheres
by the above scheme and that has worked quite well for us in practice.
With no preprocessing, we can compute the molecular surface for a 396 atom
using 40 Intel i860 processors in 0.2 seconds.
Crambin and a probe-radius of 1:4A,
We have implemented -hulls on Pixel-Planes 5, though the method is general enough
to be easily implemented on any other parallel architecture. Our approach is analytically exact. The only approximation is the degree of tessellation of spherical and
toroidal patches.
Applications in Biochemistry
Interactive computation and display of molecular surfaces should benefit biochemists
in three important ways. First, the ability to change the probe-radius interactively
helps one study the surface. Second, it helps in visualizing the changing surface of a
molecule as its atom positions are changed. These changes in atom positions could
be due to user-defined forces as the user attempts to modify a molecular model on a
computer. Third, it assists in incorporating the effects of the solvent into the overall
potential energy computations during the interactive modifications of a molecule on
a computer.
32
Acknowledgments
We would like to acknowledge the valuable discussions we had with Pankaj K. Agarwal, Dinesh Manocha, Jan F. Prins, and David C. Richardson during various stages
of this work. We would also like to acknowledge Michael E. Pique and Victoria
Roberts at the Scripps Clinic for the molecular dynamics data. We would like to
thank the anonymous referees for their suggestions which have led to improvements
in the presentation of this extended abstract as well as the video. This work was
supported by NIH National Center for Research Resources grant number 5-P41RR02170.
33
References
[1] F. Aurenhammer. Power diagrams: Properties, algorithms and applications.
SIAM Journal of Computing, 16(1):7896, 1987.
[2] M. L. Connolly. Analytical molecular surface calculation. Journal of Applied
Crystallography, 16:548558, 1983.
[3] H. Edelsbrunner. Weighted alpha shapes. Technical Report UIUCDCS-R92-1740, Department of Computer Science, University of Illinois at UrbanaChampaign, 1992.
[4] H. Edelsbrunner, D. G. Kirkpatrick, and R. Seidel. On the shape of a set of
points in the plane. IEEE Transactions on Information Theory, IT-29(4):551
559, 1983.
[5] H. Edelsbrunner and E. P. Mucke. Three-dimensional alpha shapes. ACM
Transactions on Graphics, 13(1), 1994.
[6] I. Emiris and J. Canny. An efficient approach to removing geometric degeneracies. In Eighth Annual Symposium on Computational Geometry, pages 7482,
Berlin, Germany, June 1992. ACM Press.
[7] F. M. Richards. Areas, volumes, packing and protein structure. Ann. Rev.
Biophys. Bioengg., 6:151176, 1977.
[8] R. Seidel. Linear programming and convex hulls made easy. In Sixth Annual ACM Symposium on Computational Geometry, pages 211215, Berkeley, California, June 1990. ACM Press.
[9] A. Varshney and F. P. Brooks, Jr. Fast analytical computation of Richardss
smooth molecular surface. In G. M. Nielson and D. Bergeron, editors, IEEE
Visualization 93 Proceedings, pages 300307, October 1993.
[10] A. Varshney, W. V. Wright, and F. P. Brooks, Jr. Bounding the number of unit
spheres inside a larger sphere. Technical Report UNC-CS-TR-93-039, Department of Computer Science, University of North Carolina at Chapel Hill,
1993.
34