原文地址http://www./samplings/feature-column/fcarc-voronoi IntroductionSuppose that you live in a desert where the only sources of water are a few springs scattered here and there. For each spring, you would like to determine the locations nearest that spring. The result could be a map, like the one shown here, in which the terrain is divided into regions of locations nearest the various springs. ![]() Maps like this appear frequently in various applications and under many names. To mathematicians, they are known as Voronoi diagrams. The locations of the springs are known, more generally, as sites and the set of points nearest a site is its Voronoi cell. Here is a program that shows how the diagram changes as the sites move. Voronoi diagrams are rather natural constructions, and it seems that they, or something like them, have been in use for a long time. For instance, Descartes included the following figure with his demonstration of how matter is distributed throughout the solar system. ![]() Since that time, Voronoi diagrams have been used by anthropologists to describe regions of influence of different cultures; by crystallographers to explain the structure of certain crystals and metals; by ecologists to study competition between plants; and by economists to model markets in the U.S. economy. A particularly noteworthy application appears in John Snow's analysis of the London cholera outbreak of 1854. The following map, included in Snow's Report on the Cholera Outbreak in the Parish of St. James, Westminster, During the Autumn of 1854, shows the distribution of deaths due to cholera. Each bar represents a death at that address. Snow then considered the sources of drinking water, pumps distributed throughout the city, and drew a line labeled "Boundary of equal distance between Broad Street Pump and other Pumps," which essentially indicated the Broad Street Pump's Voronoi cell. ![]() This map supported Snow's hypothesis that the cholera deaths were associated with contaminated water, in this case, from the Broad Street Pump. Snow recommended to the authorities that the pump handle be removed, after which action the cholera outbreak quickly ended. As Snow's work helped develop the modern field of epidemiology, this map has been called "the most famous 19th century disease map." Constructing Voronoi diagramsIn this article, we'll imagine we are given a finite collection of sites and will see how to efficiently construct its Voronoi diagram. When first confronted with this problem, it may seem most straightforward to consider every pair of points. An important fact is that if we are given two points ![]() In fact, we may want to think of the perpendicular bisector as dividing the plane into two half-planes, one containing the points that are closer to
Of course, as the figure on the right shows, some of the work we are doing here is not necessary; that is, some of the sites that are relatively far away from If we use this method when there are It appears that implementing this method will require us to do a lot of work, much of which is unnecessary. A natural question is whether there is a more efficient way to compute Voronoi diagrams. Fortune's algorithmIn fact, there are several ways to find Voronoi diagrams, one of which is known as Fortune's algorithm. This algorithm is based on the following clever idea: rather than considering distances between the various sites, we will introduce a line that moves through the plane and use this line to facilitate a more efficient comparison of distances. We call this line the sweep line and think of it as uncovering the Voronoi diagram as it sweeps through the plane. Let's first remember that if we are given a point ![]() We will use This is an important point so let's make it a little more clear. Consider a point ![]() or, more generally, ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Now the horizontal sweep line ![]() ![]() Now we can introduce the real star of Fortune's algorithm: the beach line is the curve formed by the lowest parabolic arcs. That is, any vertical line will pass through several parabolas; the point at which the vertical line passes through the beach line is the lowest such point. Notice that each of the arcs that composes the beach line is associated to one of the sites above the sweep line. ![]() The beach line is well suited for constructing the Voronoi diagram. For instance, if a point lies above the beach line, it must be closer to one of the sites above This may be a good time to look at an animation that shows how the beach line changes as the sweep line moves down through the plane. Let's now determine when the beach line passes through some arbitrary point ![]() and therefore ![]() This means that when The points on the beach line that lie on two parabolic arcs are called breakpoints. Applying our observation shows that the breakpoints are nearest two sites. In other words, This means that the breakpoints will sweep out the edges of the Voronoi diagram as the sweep line moves down the plane. So to construct the Voronoi diagram, we simply need to keep track of the breakpoints. Here is ananimation that shows how the edges are formed by the breakpoints. Finding the edges So far, we've seen that if we want to construct an edge of the Voronoi diagram, we simply need to keep track of the corresponding pair of breakpoints as the sweep line moves down the plane. The first step in doing this is to detect when a pair of breakpoints is constructed. This happens precisely when a new arc is added to the beach line as shown in the figures below. ![]() ![]() ![]() In other words, a pair of breakpoints corresponding to an edge in the Voronoi diagram appears on the beach line when the sweep line passes through a new site. We will call such an occurrence a site event. Finding the vertices As the sweep line moves down, the breakpoints move continuously along an edge of the Voronoi diagram until they reach a vertex of the diagram. This happens when one of the parabolic arcs along the beach line disappears. In the following sequence of pictures, notice that the second parabolic arc from the right in the left figure (the smallest arc) disappears. ![]() ![]() ![]() The appearance of new parabolic arcs on the beach line is easily detected: they occur when the sweep line passes through a site. Likewise, the disappearance of a parabolic arc is also easily detected. When a parabolic
arc shrinks to a point ![]() We call such an occurrence a circle event. The change in the diagram therefore looks like this: ![]() ![]() ![]() Notice that a new edge is also created by a circle event. This corresponds to the fact that we have a new breakpoint formed as the intersection of the two parabolic arcs that were adjacent to the disappearing arc. The algorithm We now have everything we need to know to understand Fortune's algorithm. To detect edges and vertices in the diagram, it is enough to find the appearance and disappearance of parabolic arcs in the beach line. We will therefore keep track of the beach line by imagining that we walk along it from left to right and record the order of the sites that produce its constituent parabolic arcs. We know that this order will not change until the sweep line reaches either a site event or circle event. Also, the breakpoints are implicitly recorded by noting the adjacency of the parabolic arcs on the beach line. If the next event that the sweep line encounters is a site event, we simply insert the new site into our list of sites in the order in which the corresponding parabolic arc appears on the beach line. We then record the fact that we have encountered a new edge in the diagram. If the next event that the sweep line encounters is a circle event, we record the fact that we have encountered a vertex in the diagram and that this vertex is the endpoint of the edges corresponding to the two breakpoints that have come together. We also record the new edge corresponding to the new breakpoint that results from the circle event. Whether we encounter a site or circle event, we will always check to see if we have added a new triple of parabolic arcs on the beach line that may lead to a future circle event. It is also possible that we will remove a future circle event from consideration if the triple of parabolic arcs that led to it no longer exists after the event. In this way, the diagram is constructed by considering the finite sequence of events. Shown below is the sequence of events that computes the Voronoi diagram of the collection of sites shown. Circle events are indicated by green dots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() SummaryFortune's algorithm is a remarkably efficient way to compute the Voronoi diagram. Whichever algorithm we use, we should expect that having more sites will require more work to find the Voronoi diagram. We can, however,
be more precise about this. Earlier, we considered an algorithm for finding the Voronoi diagram by finding each Voronoi cell by intersecting each half-plane containing the site. If ![]() References
David Austin |
|