Figure 4: v
i
is not removed if d > ε.
their outputs – SimpliPoly almost always matches
Douglas-Peucker, and is clearly superior in certain
cases for reasons which are not hard to understand,
and which we’ll discuss momentarily.
Theoretically, the worst-case complexity of a
straightforwardrecursive implementationof Douglas-
Peucker is O(mn), where n is the input number of ver-
tices and m the output number. The Douglas-Peucker
worst-case complexity can be improved to O(nlogn)
by using convex hulls to speed up distance compu-
tations (Hershberger and Snoeyink, 1992). As dis-
cussed earlier, SimpliPoly is always O(n), regardless
of output size. However, from our experiments with
up to a few thousand vertices (which bounds the com-
plexity of most practical applications) on a reasonable
desktop, time consumed seems not to be an issue with
either algorithm.
Qualitatively, the major difference between the
two is best seen in a canonical example, as in Fig-
ure 5. The original polyline, which is not drawn, has
the 20 vertices shown. Both SimpliPoly and Douglas-
Peucker were applied to achieve a 60% reduction to
8 vertices, the former by increasing the curvature
threshold, the latter by increasing the distance error
allowed. The SimpliPoly output is the solid line, the
Douglas-Peucker output the dashed one.
As can be seen, SimpliPoly respects the corners
(features) “more” than Douglas-Peucker. The rea-
son, of course, is that the former examines pseudo-
curvatures through a local window, thereby detecting
features that the global Douglas-Peucker method can-
not. On the two straightish (though still mildly noisy)
stretches on either side of the hump both algorithms
perform equally.
4 APPLICATIONS
Curve simplification algorithms are used to reduce
the complexity of 2D graphical scenes in a variety
of application domains. As described in the intro-
duction, curve simplification is often used to pre-
calculate a family of models at successively coarser
levels of detail. This allows an application to dy-
namically make trade-offs between image quality and
performance by choosing between representations of
varying complexity. For example, a drawing program
might use simplified models while the user is interac-
tively scrolling or zooming a scene in order to main-
tain high frame rates.
The main strength of the SimpliPoly algorithm,
when compared with a global error-based algorithm
such as Douglas-Peucker,is its sensitivity to local cur-
vature. This makes it particularly promising for appli-
cations where distinctive local features must be pre-
served. For example, terrain features in cartographic
maps, such as coastlines and elevation lines, are often
”noisy”, with many sharp local changes in direction
that vary in magnitude over the length of the feature.
An error-based algorithm will focus on the vertices
that extend outside a particular tolerance. In contrast,
a curvature-based algorithm will focus on the corners
(the points of high curvature) that define the distinc-
tive shape of the feature. SimpliPoly also includes an
error threshold that can be used interactively to cap-
ture features that change more gradually (regions of
low curvature).
It is difficult for any single algorithm to create a
high-quality simplification for both sharp and grad-
ual changes in curvature. The SimpliPoly software
allows the user to interactively adjust the curvature
and error thresholds of the algorithm to obtain a sim-
plification of the appropriate complexity and qual-
ity. Figure 6 shows a comparison of how the Sim-
pliPoly and Douglas-Peucker algorithms simplify a
curve with both sharp and gradual changes of curva-
ture. In the top example, both algorithms have re-
duced a curve with 58 vertices to 7, a reduction of
87%. The SimpliPoly algorithm is more effective at
capturing the corners of the sharp features, while the
DP algorithm is slightly more effective with the grad-
ual curves. The middle example shows the result of
increasing the number of vertices to 10 (a reduction
of 82%). Both algorithms have improved slightly by
capturing more detail of the sharp and smooth fea-
tures. The bottom example shows the effect of reduc-
ing the error threshold and increasing the curvature
threshold for the SimpliPoly algorithm, which results
SIMPLIPOLY: CURVATURE-BASED POLYGONAL CURVE SIMPLIFICATION
169