Lecture # 7

Instructor: Scot Drysdale July 2, 1996

Back to DIMACS Lectures

Homework Review:

Nearest Neighbor graph

out degree can be n-1

in degree can be 6 if the points are in a circle around a center point.
Cannot be > 6. Suppose that point A had an in-degree > 6. Then A must have two adjacent neighbors less than 60 apart. Call them B and C. One of the angles in the triangle ABC must be > 60 , because the angle at A is < 60 and there are 180 in the triangle. Without loss of generality we can assume that it is the angle at B. The edge opposite B must be longer than the edge opposite A, so C is then closer to B than to A. This contradicts the assumption that A was B's nearest neighbor.

We then discussed the idea of constructing a mesh to measure airflow around a wing cross-section. This is done by solving complex differential equations using a "finite element" method. The idea is to break up the space around the wing into small areas (called "elements") where the value is assumed to be constant. Then by seeing how each element interacts with its neighbors and using an iterative process, we can approximate the solution of the differential equation.

We looked at a simpler problem - computing the temperatures on a flat plate of metal when some edges are heated and others are cooled. First, the surface is broken up into a "mesh" or grid of small squares. The border squares are assigned fixed temperature values, and the interior squares are assigned an initial value
(perhaps the average of the edge values, or the temperature of the nearest edge value, or anything else. The choice of initial values affects the speed with which the process converges to a fixed set of values, but not the final solution.)
Each iterative "step" consists of assigning the temperature of each interior point to the average temperature of its four neighbors. This process is repeated until no square's temperature changes by more than some small tolerance value. One way of seeing if the number of squares was large enough is to repeat the computation with 4 times as many squares (twice as many each direction) to see if the solution is similar. (NOTE - this is a good programming exercise for an introductory programming course, using an array to hold the grid.)

This is an example of a "structured" mesh. For some problems it is better to use an "unstructured" mesh - one with a less regular pattern. For the wing cross-section, the designer will chose a number of points around the wing (perhaps picking them with a mouse). More points are needed close to the wing than further away, because turbulence occurs there. To get the "elements" these points are connected to form triangles. Because the Delaunay triangulation avoids small angles, it is often the method of choice for creating these triangles. (Long, skinny elements are bad in finite element methods, because the whole element has a single value.)

Cross section of an airplane -
Laminar flow - smooth flow of air over the wing.
Turbulence - chaotic behavior of air flow caused by the interaction of the air with the wing.

Will Structured meshes work or will Unstructured or adaptive meshes be better?
There is a trade off. Structured meshes are more regular so have simpler algorithms, but cannot easily conform to odd shapes (like wings) or adjust size with more elements where "things are happening" and fewer where things are not changing as quickly. Unstructured meshes avoid these problems, but are harder to create and require more complicated algorithms.

Finishing up divide and conquer from yesterday: Guibas & Stolf (slide 1) Splits in half in the same direction each time.
Dwyer first split into horizontal strips, then do a Guibas & Stolfe vertical split on each strip, and finally pairwise merge the horizontal strips.
(slide 2) Dwyer average-case is O(log log n), worst case q(n log n).

Steve Fortune's algorithm is in the book, page 179. His talk is at 11:00 July 2.

How do you compute if you are left of,left of, or on the line?
How do you compute if you are inside of a circle?

Given points A, B, and C is C left of
Signed area of triangle ABC
Sign + for counterclockwise orientation
Sign - for clockwise orientation

3D tetrahedron

How do you find the center of a circle? Compute the perpendicular bisector lines and find their intersection. Compare the radius of the circle to the distance of the point to determine if the point is out of the circle, in the circle or on the circle. Or you can actually convert this to a test of whether a point is above, below, or on a plane.

To see how this happens, we consider the simpler 1-dimensional betweeness test. If [a, b] is an interval on the x-axis, we want to know if point c lies between them. This is easy to test directly, but can be converted to a question of whether a point is left of or right of a line. Map each of a, b, and c up onto the parabola f(x) = x2. That is, map a onto the point (a, a2), b onto the point (b, b2), and c onto the point (c, c2). Note that if c is between a and b it will map onto the "bulge" of the parabola below the ray ab, so will be right of ab. If it is outside of [a, b] it will map to a point to the left of ab.

The same idea generalizes to higher dimensions. In 2 dimensions, to test if a point is within a circle through three other points, we lift them onto the parabola of rotation by mapping (x, y) onto (x, y, x2 + y2). Points within the circle map below the plane through the three lifted points and points outside of the parabola map to points above the plane. (Slide 3) The intersection of the plane with the parabola of rotation will produce an ellipse that projects into a circle on the xy plane.

This observation gives us a different way of computing the Delaunay triangulation. If n points in the xy plane are lifted onto the paraboloid of rotation and their convex hull is computed in 3-D, faces of that convex hull will generally be triangles. Each face is contained in a plane of support - a plane that goes through the points on that face and has all other points to one side of it. Note that if all points are above such a plane, then the circle in xy defined by the three original points must be empty. That is, downward-looking faces of the convex hull of the lifted points correspond to Delaunay triangles, so projecting the downward-looking faces (the ones you can see looking at the convex hull from negative infinity) onto the xy plane gives you the Delaunay triangulation of the original points. Figures of this appear on page 198 of the textbook. A Java applet that lets you rotate the convex hull after lifting the points appears in: http://www.cs.dartmouth.edu/~gessel/Java/CGApp.html

Four points in 3-space have a convex hull that is a tetrahedron.

What if you look at the top face? Each of them corresponds to a circle containing ALL the other sites. This is shown on Page 203. This is the dual of the Farthest Point Voronoi Diagram, where each point is associated with the point farthest from it.

(slide 4 ) Farthest point Voronoi diagram. Region 6 corresponds to point 6, these are all the points farthest away from point 6. Only points on the convex hull are assigned regions because if you are inside then you can't be farthest away from any other point. How can you find the smallest circle that contains all the points?

Andy Hanson's home page
Java Applets for sorting convex hulls and Voronoi Diagrams are available at:

Mailto: dimacs-www@dimacs.rutgers.edu
Last modified: October 3, 1996