[more stoer results; additional figure with multi mecs
raph.levien@gmail.com**20090720001550] {
hunk ./elastica.tex 631
+
+\begin{figure*}
+\begin{center}
+\includegraphics[scale=.65]{figs/multi_mec}
+\caption{\label{multimec-fig}Multiplicity of solutions for same tangent constraints.}
+\end{center}
+\end{figure*}
+
+Note that the above discussion only reflects the \emph{principal
+  solution} of the elastica with respect to the constraints, i.e. the
+one with the minimum number of loops. The periodic nature of the
+elastica implies that additional solutions may also exist, with more
+than one inflection point. In general, these additional solutions are
+not interesting for the purpose of generating spline curves, but they
+are valid solutions. Figure \ref{multimec-fig} shows a number of these
+solutions for the end constraints $\theta_0 = \pi/4,\ \theta_1=
+\pi/4,\ \lambda = 1/2$. It is interesting that some of these solutions
+lack symmetry even though the constraints themselves are symmetrical.
hunk ./figs/Makefile 4
-	rect_elast.pdf \
+	rect_elast.pdf multi_mec.pdf \
hunk ./figs/Makefile 132
+	python ps2pdfbbox.py /tmp/foo.ps $@
+
+multi_mec.pdf:	mecsolve.py
+	python mecsolve.py $@ > /tmp/foo.ps
hunk ./figs/mecsolve.py 675
-    delta = 1e-3
hunk ./figs/mecsolve.py 681
+    return findmec_init(th0, th1, sm, sp)
+
+def findmec_init(th0, th1, sm, sp):
+    delta = 1e-3
hunk ./figs/mecsolve.py 1015
+def multi_mec():
+    print '%!PS-Adobe-3.0 EPSF'
+    print '/Times-Roman 12 selectfont'
+    th0, th1 = pi / 4, pi / 4
+    uscale = 0.5
+    for i in range(9):
+	print 'gsave'
+	print -180 + 130 * (i % 3), 280 - 130 * (i / 3), 'translate'
+	sm = 3.
+	sp = sm + i * 1.0
+	#sp = (5., 9., 11., 17., 19., 23.)[i]
+	if 1:
+	 sm, sp = ((3., 5.),
+		  (5., 13.),
+		  (3., 9.),
+		  (5., 15.),
+		  (3., 11.),
+		  (5., 19.),
+		  (3., 17.),
+		  (3., 21.),
+		  (5., 23.),
+		  (3., 17.))[i]
+	osm, osp = sm, sp
+	result = findmec_init(th0, th1, sm, sp)
+	if result:
+	    sm, sp = result
+	    k0, lam1, lam2 = justify_mec(sm, sp)
+	    xys, cost, x, y, th = run_elastica(-.5, .5, k0, lam1, lam2)
+	    dx = xys[-1][0] - xys[0][0]
+	    dy = xys[-1][1] - xys[0][1]
+	    ch = hypot(dx, dy)
+	    chth = atan2(dy, dx) + pi
+	    s = uscale * sin(chth) / ch
+	    c = uscale * cos(chth) / ch
+	    xo = -xys[0][0] * c - xys[0][1] * s
+	    yo = -xys[0][0] * s + xys[0][1] * c
+	    newxy = [(xo + xy[0] * c + xy[1] * s, 
+		      yo + xy[0] * s - xy[1] * c) for xy in xys]
+	    plot(newxy)
+	    #print '310 400 moveto (%5.2f, %5.2f) show' % (osm, osp)
+	print 'grestore'
+    print 'showpage'
+    eps_trailer()
+
hunk ./figs/mecsolve.py 1082
+elif figname == 'multi_mec':
+    multi_mec()
hunk ./two.tex 702
-The answer is given in a 1982 paper by Stoer
+A partial answer is given in a 1982 paper by Stoer
hunk ./two.tex 705
-  Theorem 2.25.} Indeed, there is always a solution, in fact countably
-infinitely many. In other words, for any given sequence of control
-points, there exist infinitely many assignments of Euler spiral
-parameters such that the resulting segments have $G^2$ continuity.
+  Theorem 2.25.} Stoer considered a slightly weaker formulation of the
+Euler spiral spline: each segment is piecewise an Euler spiral
+segment, and there is $G^2$ continuity, but there are no additional
+constraints on the endpoints. Given these relaxed constraints, there
+is always a solution, in fact infinitely many. In other
+words, for any given sequence of control points, there exist
+infinitely many assignments of Euler spiral parameters such that the
+resulting segments have $G^2$ continuity.
hunk ./two.tex 752
+In addition, using the global minimum of MEC energy will also have an
+effect on the curvature at the endpoints. Since minimizing MEC over
+all curves assigns zero curvature to endpoints (see Section
+\ref{mec-interp-sec}), and the Euler spline primitive is a fairly good
+approximation of the MEC primitive, at least in the small-angle
+assumption the curvature at the endpoints would be approximately zero.
+
+It is not currently known whether a solution always exists in the
+presence of additional endpoint constraints, such as zero curvature
+variation for the terminal segments. Obviously, with the methods of
+Stoer it is possible to apply such a constraint to one side, but it's
+not clear whether there, for all input sequences of points, an
+assignment of tangent for the left side such that the curvature
+variation is zero on the right side.
+
hunk ./two.tex 771
-excessive. The main result of the Stoer paper is that a solution does
-always exist.
+excessive.
}
