\chapter{Space curves}
\label{space-chapter}
The focus of this thesis has been on curves in the plane, but much of
the literature on splines is also concerned with the generalization to
space curves -- a continuous mapping from arc length to points in space,
$\mathbb{R} \rightarrow \mathbb{R}^3$. For example, Moreton's
investigation of the MEC and MVC \cite{Moreton92} is equally concerned
with space curves as with planar curves.
%\vspace{5mm}
\begin{figure*}[ht]
\begin{center}
\includegraphics[width=5in]{figs/drawmetal_3}
\caption{\label{drawmetal}Space curves rendered into ironwork.}
\end{center}
\end{figure*}
Space curves have many applications, including architectural
ironwork. The interpolating spline techniques of this thesis have
already shown much promise for this application. Figure
\ref{drawmetal} shows ironwork space curves which have been
constructed starting from planar interpolating curves. These pieces
are by Terry Ross, as is the Curve Maker software (implemented in the
Ruby language as a plugin for the Google SketchUp 3D CAD tool),
adapted from the algorithms described in this thesis \cite{DrawMetal}.
Many of the techniques presented here are also
applicable to space curves. There are a number of viable paths.
First, variationally defined splines are also valid in
three-space. The MEC, in particular, generalizes
straightforwardly. Its definition in three-space is the same as on the
plane; it is the curve that minimizes bending energy (L2 norm of
curvature) that also interpolates the points.
Second, space curve splines may be defined as curve segments drawn
from a parametrized space, with additional curvature constraints.
This chapter begins with a brief review of the properties of space
curves (Section \ref{space-curves-sec}). Section \ref{space-mec-sec}
discusses the generalization of the MEC to space curves, including the
property that this family of curves has three parameters, in contrast
to two for the planar MEC, as well as the continuity properties of the
space MEC used as an interpolating spline. Section
\ref{mehlum-spiral-sec} presents Mehlum's generalization of the Euler
spiral to space splines, a particularly appealing approach. Section
\ref{space-aesthetic-sec} discusses a generalization of log-aesthetic
curves to space. Finally, Section \ref{surfaces-sec} considers the
possibility of applying similar techniques to the problem of
interpolating surfaces, a much more challenging problem.
\section{Curves in space}
\label{space-curves-sec}
In Cartesian coordinates, the representation of a space curve simply
adds a $z$ coordinate to the $x$ and $y$ of plane curves. The
intrinsic representation also adds an additional dimension. While a
plane curve is characterized by its curvature, a space curve is
characterized by curvature and torsion. The plane curve with
constant curvature is a circle, and the corresponding space curve
with constant curvature and torsion is the helix.
An excellent introduction to the differential geometry of space curves
is Chapter 2 of Kreyszig's \emph{Differential Geometry}
\cite{Kreyszig91}. This section simply restates some of the elementary
properties of space curves, for convenience.
The \emph{moving trihedron} (also known as the Frenet frame) consists
of three orthogonal vectors. For a curve defined as a vector
$\mathbf{x}$ as a function of arc length $s$, the \emph{tangent vector}
is $\mathbf{t} = d\mathbf{x}/ds$, the \emph{principal normal} is
defined as
\begin{equation}
\mathbf{p} = \frac{d\mathbf{t}/ds}{|d\mathbf{t}/ds|} =
\frac{1}{\kappa}\frac{d^2 \mathbf{x}}{ds^2} \:.
\end{equation}
The tangent and principal normal are orthogonal, and both lie in the plane
of the osculating circle. The third component of the moving trihedron
is the \emph{binormal}, and is orthogonal to the osculating circle.
\begin{equation}
\mathbf{b} = \mathbf{t} \times \mathbf{p}\:.
\end{equation}
Torsion is the rate of change of the direction of the binormal
vector.
\begin{equation}
\tau = -\mathbf{p} \cdot \frac{d\mathbf{b}}{ds}\:.
\end{equation}
An important result is that a curve is planar if and only if torsion is
everywhere zero.
The concept of geometric continuity is similar in space as in the
plane. In particular, a space curve has $G^2$-continuity if its
osculating circle is continuous along its arc length. Torsion
need not be continuous in a $G^2$-continuous space curve.
The bending energy of a wire is, as in the planar case, proportional
to the integral of the square of curvature. Note that the bending energy
does not directly depend on torsion. A physical wire may also have
\emph{twist}, but this is not considered here; for spline
applications, it may be assumed that the wire can untwist to find its
minimum energy configuration.
\section{Minimum energy curve in space}
\label{space-mec-sec}
Likely the first actual solution to the shape of the MEC in space was
by Kirchoff, who found that the kinetic analogy for the planar
elastica (see Section \ref{kinetic-analogy-sec}) also generalizes to
three-space fairly straightforwardly. While the planar elastica
corresponds to a pendulum rotating around a fixed point, constrained
to a plane, the minimum energy curve in space corresponds to a
spinning top, also gyrating around a fixed point. Goss, in his
Ph.D. thesis, traces out the history of this development
\cite[p. 37]{Goss03}. The result is also presented in Greenhill's 1892
book on the applications of elliptic curves \cite{Greenhill1892}. Max
Born's Ph.D. thesis also contains a derivation of the differential
equations of the curve from variational principles \cite{Born1906},
but his choice of spherical polar coordinates makes the equations
fairly awkward.
A more modern derivation of the shape of the MEC in space is contained in
Mehlum's work on nonlinear splines, published in 1974 \cite{Mehlum74}
and later refined \cite{Mehlum85, Meh94}. Most importantly, Mehlum
discovered a simple relationship between curvature and torsion for all
solutions of the elastica \cite[Eq. 2.21]{Mehlum74}.
\begin{equation}
\label{mehlum-tau-eq}
\kappa^2\tau = C
\end{equation}
Mehlum also derived the following equation for the curvature as a
function of arc length. Since a space curve is completely characterized
by its curvature and torsion, given the above relation, the shape is
determined by a differential equation in one variable.
\begin{equation}
\label{mehlum-space-eq}
\left [(\kappa^2)'\right ]^2 + \kappa^2\left [(\kappa^2 - 2D)^2 - 4\psi^2\right ] + 4C^2 = 0,
\end{equation}
\noindent where $C$, $D$, and $\psi$ are arbitrary constants
\cite[Eq. 2.24]{Mehlum74}. Compare with Equation \ref{elastica-kappa},
the equation for the elastica in the plane.
\subsection{MEC as spline in 3-space}
\label{space-mec-spline}
When used as a spline, the MEC has the following
properties:
\begin{itemize}
\item Each segment is an energy-minimizing space curve, constrained
by the \emph{tangent vectors} relative to the chord at both endpoints.
\item $G^2$-continuity is preserved across control points, as in the
planar case. However, torsion may be discontinuous.
\item Each curve segment is controlled by three parameters. The
additional parameter corresponds to the deviation of the two tangent
vectors from being planar.
\end{itemize}
Each tangent vector has two components (equivalent, for example, to
the spherical polar coordinates $\theta$ and $\phi$). This would seem to
suggest that there are \emph{four} parameters for each curve
segment. However, counting in this way would include one parameter for
rotations around the chord, which, as a rigid body transformation, is
not actually a true parameter of the underlying curve family. Thus,
the actual number of parameters is three. The \emph{relative} rotation
around the chord is related to the overall torsion on the curve; when
this rotation is zero, the torsion vanishes and the curve becomes the
planar MEC.
Of course, the MEC in three-space has the same drawbacks as the planar
MEC, including the lack of roundness and existence. Thus, a
generalization of the Euler spiral is also worth seeking. As of now,
there are two viable proposals for such a generalization: Mehlum's
spiral, discussed in Section \ref{mehlum-spiral-sec}, and a
generalization of log-aesthetic curves to space, discussed in Section
\ref{space-aesthetic-sec}.
Except in the planar case, a space MEC never has an actual
inflection point, i.e. a point in which curvature is zero. In the
nearly-planar case, the curvature drops very low, and torsion peaks in
this region, so that the plane of the osculating circle swings through
nearly $180^{\circ}$.
As for higher degrees of continuity, Moreton \cite{Moreton92} described
a reasonable (but computationally intensive) techniques for computing a
good approximation to the MVC, providing $G^4$ continuity. Likely,
either an exact solution based on variational techniques, or a good
approximation, would yield similar results with much less
computational cost.
\section{Mehlum's spiral}
\label{mehlum-spiral-sec}
One beautiful proposal for generalizing the Euler spiral into space is
by Even Mehlum \cite{Mehlum74}. It can be understood both as an
approximation to the space MEC (entirely analogous to the way in which
the Euler spiral is an approximation to the planar elastica), and as a
geometric construction in which the Euler spiral is rolled up onto the
surface of a sphere.
To derive the curve from the space MEC, assume that $\kappa^2 \ll
2D$. Then, Equation \ref{mehlum-space-eq} simplifies to
\begin{equation}
\left [(\kappa^2)' \right ]^2 - 4 \alpha^2 \kappa^2 + 4C^2 = 0\:,
\end{equation}
\noindent where $\alpha$ is a constant (it is equal to $\psi^2 - D^2$,
combining these two constants into one). This equation, however, has a
simple analytic solution,
\begin{equation}
\label{hyperb-eq}
\kappa^2 = \alpha^2s^2 + \frac{C^2}{\alpha^2}\:.
\end{equation}
\begin{figure*}[tbh]
\begin{center}
\includegraphics[scale=0.55]{figs/hyperb.pdf}
\caption{\label{hyperb-fig}Curvature as a function of arc length in
the Mehlum spiral.}
\end{center}
\end{figure*}
When $C = 0$, this equation simplifies to $\kappa = \alpha
s$, the equation of the Euler spiral. In general, it is the
equation of a hyperbola, as shown in Figure \ref{hyperb-fig}.
A space curve requires both curvature and torsion. For the latter,
simply retain Equation \ref{mehlum-tau-eq} from the planar MEC. Thus,
these equations fully define a family of curves suitable as the basis
for an interpolating spline. This family was used as the basis of the
{\sc kurgla} 2 interpolating spline algorithm in the Autokon system
\cite{Mehlum74}.
Further analysis by Mehlum and Wimp \cite{Mehlum85} revealed a
surprising geometric property of this curve -- it lies entirely on the
surface of a sphere. That analysis is based on a well-known intrinsic
equation relating curvature and torsion, as a necessary and sufficient
condition for a space curve to lie on a sphere \cite[Eq. 2.8]{Mehlum85}.
\begin{equation}
\frac{\tau}{\kappa} - \Big ( \frac{\kappa'}{\tau\kappa^2} \Big )' = 0
\end{equation}
For values of curvature following the function described in Equation
\ref{hyperb-eq}, this relation (after a bit of algebraic manipulation)
is shown to be equivalent to Equation \ref{mehlum-tau-eq}.
Even more recently, Mehlum discovered a purely geometric construction
of this space curve (credited jointly with Professor Ronald Resch),
based on rolling up an Euler spiral onto the surface of a sphere
\cite{Meh94}. He writes,
\begin{quote}
Draw a Cornu spiral with wet ink in the $xz$ plane. The curvature of
the spiral is specified by $\kappa = \alpha s$. Place a sphere with
radius $R = \frac{\alpha}{C}$ at the $xz$ plane with the tangent point
at the origin. Roll the sphere along the Cornu spiral such that the
axis of rotation always goes through the center of the sphere and that
point on the evolute of the spiral that corresponds to the touching
point of the sphere at the spiral. The sphere is always tangent to the
$xz$ plane during the rotation.
\end{quote}
Mehlum's 1994 paper \cite{Meh94} also contains, in an impressive feat
of analysis, closed-form formulas for the Cartesian coordinates of the
space curve as a function of arc length, using confluent hypergeometric
functions.
This curve seems a very good choice for an interpolating space curve,
both because of its excellent practical properties (generalized from
those of the Euler spiral) and for its mathematical beauty. I know of
no other implementations than the original Autokon system.
\section{Log-aesthetic space curves}
\label{space-aesthetic-sec}
Another fruitful avenue for exploration is the generalization of
log-aesthetic curves to space \cite{Yoshida09}. Recall that the planar
log-aesthetic curve is defined as a straight-line plot of curvature vs
(scaled) derivative of curvature when both are plotted on a logarithmic
scale. The space log-aesthetic curve applies the analogous constraint
to the torsion as well. Just as the circle is a special case of the
planar log-aesthetic curve, the helix is a special case of the
corresponding space curve. There are a number of additional
parameters of this curve family, so determining these parameters
remains an interesting open problem.
The parameter space admits many different types of curves. In
particular, some have both curvature and torsion increasing as a
function of arc length. These curves generally resemble a
corkscrew. One of Mehlum's main results is that, in a space curve
resulting from the physical bending of a wire, the curvature and
torsion vary oppositely (see Equation \ref{mehlum-tau-eq}). In regions
of high curvature, torsion is low, and vice versa. Perhaps this
heuristic could be applied to curves from the log-aesthetic family to
reduce the dimensionality of the parameter space while preserving
desirable solutions.
\section{Surfaces}
\label{surfaces-sec}
While well beyond the scope of this thesis, some of the concepts
described here also generalize to surfaces. Moreton's work
\cite{Moreton92} is one of the earliest presentations of an
interpolating surface defined in terms of minimizing an energy
functional. These techniques are known to be extremely computationally
intensive. Furthermore, the choice of energy functional to
minimize is not obvious (just as in the planar case). Among the
proposals are MES (Minimum Energy Surface), analogous to the planar
MEC, and MVS (Minimum Variation Surface), analogous to the planar MVC.
One proposal for such an energy functional to minimize is the
$\mbox{MVS}_{\mbox{\scriptsize cross}}$ functional of Joshi and S\'equin \cite{Joshi07}. For
the input configurations tested, the surface minimizing this
functional is more balanced and aesthetically pleasing than the pure
MES and MVS functionals.
A very intriguing direction to explore is whether surface segments may
be drawn from a parametrized family in the same way that curve
segments are drawn in the planar and space-curve cases. Such an
approach holds the promise of much faster computation than iteratively
evolving a surface to reduce its energy functional. Candidates for
such surfaces include a family of patches that minimize an energy
functional (analogous to the MEC), generalizations of the log-aesthetic
curve family to surfaces, and quasi-static liquids \cite{Swanson09},
which are defined as energy minimizing in the presence of certain
additional constraints.
% Dr. Spaceman says: 4 out of 5 doctors prefer the Mehlum space
% spline.