\chapter{Conclusion}
\label{conclusion-chapter}

Interpolating splines are a useful and important tool for designing
curves. However, choosing one from the multiplicity in the literature
is not easy. While fairness is obviously a crucially important
property, there has been no universal consensus on what makes an ideal
interpolating spline, or even how fairness should be measured.  In
this thesis, I have argued that an ``ideal'' spline must share two
properties with the Minimum Energy Curve, the mathematical
idealization of the mechanical spline based on a thin strip of elastic
material. First, it must be extensional, meaning that adding an
additional control point on the curve does not change the shape of the
curve. Second, the spline should be based on a two-parameter family of
primitive curves, joined together at control points with
$G^2$-continuity. Higher degrees of continuity (also corresponding to
more parameters for the primitive curve) are possible, but come at the
cost of poorer locality.

Based on evidence from existing splines in the literature, two
parameter splines have better locality than splines defined from a
larger parameter space. Two-parameter splines can easily achieve
$G^2$-continuity, and no higher degree of continuity is required for a
planar curve to appear smooth to the human visual system.

In fact, there is in general a tradeoff between fairness and
locality. A degenerate spline consisting of straight lines has perfect
locality but terrible fairness. More usefully, the interpolating
spline based on the log-aesthetic curve covers a range of this
tradeoff, based on a scalar parameter (the exponent of the relation
between curvature and arc length).

A significant result of this thesis is that all two-parameter,
extensible splines can be defined in terms of a generator curve, 
presented in Section \ref{generator-curve-sec}. As a result, for this
important subclass of $G^2$-continuous splines, the design space is
reduced to choosing the best curve, both in terms of the aesthetic
beauty of the curve itself and also the properties of the
corresponding spline.

The Euler spiral is an excellent choice for this generator curve. In
fact, the Euler spiral is better in nearly every respect than the MEC,
the only exception being minimization of the MEC energy functional
itself. However, as demonstrated by human experiment (see Section
\ref{sec-aesthetic}), MEC energy is not a good predictor of perceived
fairness. The Euler spiral spline has identical locality properties,
and, unlike the MEC, is round (producing a circular arc when the
control points are co-circular), and a solution nearly always exists.

One promising candidate for the generating curve is the family of
log-aesthetic curves, parameterized by the exponent $\alpha$. At
$\alpha = 1$, the Euler spiral is one instance of this family. Higher
values of $\alpha$ exhibit better locality, but overly large values
have poor perceived fairness. However, as measured by empirical study,
values of $\alpha$ between 1.5 and 2 have both better locality and
better fairness than the Euler spiral. Based on these properties, it
would seem like the log-aesthetic spline with a higher exponent would
be an even better interpolating spline than that based on the Euler
spiral. Indeed, for solving a spline based on a static sequence of
control points, the log-aesthetic spline tends to produce good results.

\begin{figure*}
\begin{center}
\includegraphics[scale=.8]{figs/aes2_contours}
\caption{\label{aes2-lut}Contour plot of curvature lookup table for
  $\alpha=2$ log-aesthetic curve.}
\end{center}
\vspace{-2.7in} \hspace{2in}$\theta_0$ (radians)
\raisebox{2in}{\hspace{1in}$\theta_1$}
\vspace{1in}
\end{figure*}

However, in interactive use, a weakness of the log-aesthetic spline
emerges. For many configurations of input points, a small perturbation
to the input causes a fairly significant change to the curve, even
when the angles are small. One way to analyze this phenomenon is to
look at the relation between tangent angles and curvature. While it is
very nearly linear for the Euler spiral (see Figure \ref{euler-lut}),
the log-aesthetic plot has significant nonlinearities, even for very
small angles, as shown in Figure \ref{aes2-lut}.

An excellent way to achieve better fairness (albeit at the expense of
locality) is to require higher degrees of geometric continuity. In the
variational framework, the Minimum Variation Curve (MVC) is a
four-parameter spline with $G^4$-continuity. A strong motivation was
to fix the roundness problem of the MEC. While previous researchers
have used numerical techniques to minimize the functional (especially
Moreton \cite{Moreton92}), one contribution of this thesis is to
develop the exact general equation for the MVC. Happily, the MVC has a
very simple formula relating curvature with Cartesian coordinates:
$\kappa'' = \lambda y$, which also has an appealing parallelism with
the corresponding equation for the MEC, $\kappa = \lambda y$.

The MVC has a simple approximation, writing curvature as a cubic
polynomial in terms of arc length. It is entirely analogous to the
Euler spiral spline, which can be seen as a simpler, more robust
approximation to the MEC. This curve admits very efficient numerical
techniques (presented in Section \ref{sec-numint}), for fast and
robust computation. Interestingly, the cubic polynomial spiral spline
was first described by Ohlin in 1987 \cite{ohlin87}, but with little
impact at the time, probably because Ohlin did not adequately
characterize its properties.

The $G^4$-continuous polynomial spiral spline (or ``spiro'' for short)
is quite practical, and has been used to draw many font
outlines. Because of its poorer locality properties relative to the
Euler spiral spline, it requires more points to adequately describe
letter-shapes without exhibiting the ripple effect, but only about a
factor of two, based on experience drawing multiple fonts (described
in detail in Chapter \ref{fonts-chapter}). Because $G^2$-continuity is
sufficient for the perception of fair curves, I have taken to using
primarily the Euler spiral spline for my later font work.

For pure interpolating splines, the tradeoff between fairness and
locality seems somewhat uncompromising. In practice, the biggest
problem is that regions of high curvature causes ripples, analogous to
``ringing'' in digital filters. Fortunately, adding explicit
one-way constraints to the control points isolates these regions of high
curvature and prevents ripples entirely. The implementation of these
constraints uses the same four-parameter curve primitive as used to
generate splines with $G^4$-continuity. Instead of enforcing
continuity of higher derivatives of curvature, these ``one-way''
(asymmetrical) constraints enforce zero derivatives of curvature on
one side only of the control point, while still preserving
$G^2$-continuity everywhere. In practice, these constraints are
especially useful for making smooth transitions from straight to curved
sections, a common configuration in letter-shapes.

A major motivation of this thesis was to explore the idea of the best
possible interpolating spline, regardless of computational complexity,
based on the idea that Moore's Law would ultimately make even
computationally extremely expensive splines practical. However, work
on efficient implementation proved very fruitful, and the numerical
techniques developed in this thesis are competitive with cruder,
polynomial-based splines.

Especially for font design, it is important to represent the resulting
shapes in a format that can be widely used. Because the
industry-standard font formats are all based on B\'ezier curves, I
developed algorithms for converting curves into this form, producing
curves that are visually nearly identical to the original spline
curves (based on a carefully designed error metric), while using an
optimally small number of segments, to keep file size for the
resulting fonts small.

A signifcant focus of this work was to quantify the properties of the
various interpolating splines explored in this thesis, to facilitate
choosing the best one for any given application. In using these
splines for drawing a number of fonts, I also found they brought an
aesthetic quality to the work. Designing on the screen (rather than
starting on paper), I found that I could readily achieve the smooth,
classical shapes I desired. Knowing that the curves have a strong
mathematical foundation added to this aesthetic sense, as did the fact
that the numerical techniques were based on rapidly computing nearly
exact analytical solutions, rather than merely crude approximations.
It is my hope that in publishing this work and releasing the code
under an open-source license, a wider audience of designers will
experience the pleasure of working with these superior tools.
