Thoughts on Whether Two Elliptical Sheets Can Be Glued into a Solid
A couple of weeks ago I came across an intriguing question in a group chat again: can two identically-sized elliptical sheets, each bent along its major axis, be glued together along their edge curves to perfectly form a closed solid? The question originates from a Zhihu post, "Can two elliptical sheets be perfectly joined by bending them into cylindrical-like surfaces along the edge?"
Illustration of two elliptical sheets glued together (screenshot from the Zhihu question illustration)
A question that can be stated in just a few words, understandable even by an ordinary reader, yet with real difficulty behind it — that's precisely what makes for a beautiful problem, and it's what drew me to keep mulling it over for many days. Yesterday I finally worked out a general approach for setting up and numerically solving equations for this type of problem, and today I completed the theoretical proof, confirming that two identical elliptical sheets can always be perfectly joined. more
Arc-length Parametric Equations
As preparation, let's first derive the arc-length parametric equations of the ellipse. As shown in the figure below, if the arc length starting from $(a,0)$ is $s$, what is the corresponding $y=h(s)$?
Arc-length parametric equation of the ellipse
In principle, this problem isn't hard to solve. Since the standard equation of the ellipse is:
\begin{equation}\frac{x^2}{a^2}+\frac{y^2}{b^2}=1\end{equation}
that is, $x=a\sqrt{1-y^2/b^2}$, the arc length of the ellipse can be written as:
\begin{equation}s=\int_0^y \sqrt{1+\left(\frac{dx}{dy}\right)^2}dy=\int_0^y \sqrt{\frac{a^2 y^2}{b^4-b^2 y^2}+1}dy\label{eq:bs}\end{equation}
This integral can be expressed using the "incomplete elliptic integral of the second kind." On the interval $[0,b]$, $s$ is monotonically increasing with respect to $b$, so the inverse function must exist. For numerical computation purposes, we don't actually need to know what this inverse function is explicitly — we only need to numerically integrate $\eqref{eq:bs}$ to compute a bunch of corresponding pairs $(y,s)$, and then swap the positions of $y,s$, which effectively gives us the relation $y=h(s)$ (defining a function point by point).
The Equation of the Glued Edge Curve
Now let's turn to the original problem: assuming the sheets can indeed be glued together, what is the equation of the edge curve? Let's set up a coordinate system as shown in the figure below (left):
The glued edge curve of the two elliptical sheets (blue line)
Arc-length parametric equation of the ellipse
In the figure above, we only consider the first octant; the blue curve is the curve whose parametric equation we wish to find, and the correspondence between this spatial curve and the original planar ellipse curve has been marked using the same colors as in the previous figure (right). Let $P=(x(s),y(s),z(s))$ be a point on the curve, and suppose the arc length $OP$ equals $s$ — this segment of arc length is in fact also a segment of arc length on the original ellipse. As discussed earlier, from the arc length we can find the $y$ coordinate:
\begin{equation}y=h(s)\end{equation}
Then, due to the symmetry (complementary) relationship, the $z$ coordinate is in fact the $y$ coordinate corresponding to an arc length of $l-s$, i.e.
\begin{equation}z=h(l-s)\end{equation}
where $l$ is one quarter of the total perimeter of the ellipse, i.e., the total length of the blue curve.
Now we have $y,z$, but we're still missing $x$. Since $s$ is an arc-length parameter, it must satisfy $dx^2+dy^2+dz^2=ds^2$, i.e.
\begin{equation}\left(\frac{dx(s)}{ds}\right)^2+\left(\frac{dh(s)}{ds}\right)^2+\left(\frac{dh(l-s)}{ds}\right)^2=1\end{equation}
This lets us integrate to obtain $x(s)$:
\begin{equation}x(s) = \int_0^s \sqrt{1-\left(\frac{dh(s)}{ds}\right)^2-\left(\frac{dh(l-s)}{ds}\right)^2}ds\label{eq:f}\end{equation}
And whether
\begin{equation}1-\left(\frac{dh(s)}{ds}\right)^2-\left(\frac{dh(l-s)}{ds}\right)^2 \geq 0\label{eq:c}\end{equation}
holds identically is precisely the criterion for whether the sheets can be glued together.
Proving That the Sheets Can Be Glued Together
Below we prove theoretically that two elliptical sheets can indeed be perfectly joined, i.e., we verify that $\eqref{eq:c}$ holds identically.
First, we need to prove a lemma:
In the ellipse $x^2/a^2 + y^2/b^2=1(a \geq b > 0)$, we have
\begin{equation}\left.\left(\frac{dy}{dx}\right)^2\right|_{s=s_0}\leq \left.\left(\frac{dx}{dy}\right)^2\right|_{s=l-s_0}\end{equation}
That is, the absolute value of the slope at arc length $s_0$ does not exceed the absolute value of the reciprocal of the slope at arc length $l-s_0$.
The proof goes as follows (it's not hard — sketching it out by hand makes it clear):
Using the familiar parametric equation of the ellipse
\begin{equation}x=a\cos t,\quad y=b\sin t\end{equation}
note that the direction in which this parameter $t$ increases is the same as the direction in which $s$ increases — both go counterclockwise starting from $(a,0)$ — so $s$ and $t$ are also monotonically increasing with respect to each other.Intuitively, this amounts to proving that "the arrow viewed from the side on the left" is steeper than "the arrow viewed head-on on the right"
We can obtain
\begin{equation}\left.\left(\frac{dy}{dx}\right)^2\right|_{t=t_0} = \frac{b^2\cos^2 t_0}{a^2\sin^2 t_0}\leq \frac{a^2\sin^2 (\pi/2-t_0)}{b^2\cos^2 (\pi/2-t_0)}=\left.\left(\frac{dx}{dy}\right)^2\right|_{t=\pi/2-t_0}\end{equation}
That is to say, the slope at $t=t_0$ never exceeds the absolute value of the reciprocal of the slope at $t=\pi/2-t_0$, and clearly, the smaller $t_0$ is, the larger $\left.\left(\frac{dx}{dy}\right)^2\right|_{t=\pi/2-t_0}$ is.
Now consider
\begin{equation}\frac{ds}{dt}=\sqrt{\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2}=dt\sqrt{a^2 - (a^2-b^2)\cos^2 t}\end{equation}
Note that this is a monotonically increasing function of $t$ (both restricted to the interval $t\in[0,\pi/2]$), which means that $s$ increases as $t$ increases, and moreover it increases at an ever faster rate. This implies that
\begin{equation}s_{[0,t_0]}\leq s_{[\pi/2-t_0,\pi/2]}\end{equation}
That is, the arc length over the interval $[0,t_0]$ does not exceed the arc length over the interval $[\pi/2-t_0,\pi/2]$, which in turn implies that if $s_{[0,t_0]} = s_{[\pi/2-t_1,\pi/2]}$, then $t_1 \leq t_0$. In other words, if $s=s_0$ corresponds to $t=t_0$ and $s=l-s_0$ corresponds to $t=t_1$, then $t_1 \leq t_0$, and by the discussion just given:
\begin{equation}\left.\left(\frac{dy}{dx}\right)^2\right|_{s=s_0}=\left.\left(\frac{dy}{dx}\right)^2\right|_{t=t_0} \leq \left.\left(\frac{dx}{dy}\right)^2\right|_{t=\pi/2-t_1}=\left.\left(\frac{dx}{dy}\right)^2\right|_{s=l-s_0}\end{equation}
With this lemma in hand, we can now prove:
\begin{equation}\left(\frac{dh(s)}{ds}\right)^2+\left(\frac{dh(l-s)}{ds}\right)^2\leq 1\end{equation}
Here $h(s)$ is precisely the $y$ coordinate of the original ellipse, so suppose the corresponding $x$ coordinate is $g(s)$. Then:
\begin{equation}\left(\frac{dh(s)}{ds}\right)^2+\left(\frac{dg(s)}{ds}\right)^2 = 1\end{equation}
which is equivalent to proving
\begin{equation}\left(\frac{dh(l-s)}{ds}\right)^2\leq\left(\frac{dg(s)}{ds}\right)^2\end{equation}
Taking reciprocals on both sides and using $ds^2=dg^2+dh^2$, this is in fact equivalent to proving
\begin{equation}\left.\left(\frac{dg}{dh}\right)^2\right|_{s=l-s_0}\geq\left.\left(\frac{dh}{dg}\right)^2\right|_{s=s_0}\end{equation}
which is exactly the lemma we just proved.
Numerical Results
Mathematically, $\eqref{eq:f}$ already qualifies as an explicit (analytic) solution for the curve we sought. Of course, an explicit solution doesn't mean it's expressible in elementary functions, nor does it mean it's easy to compute. Although most results in differential geometry are stated as arc-length parametric equations, that's mostly a theoretical convenience — in practice, apart from circles and straight lines, hardly any curve has a simple arc-length parametrization.
To numerically verify the condition $\eqref{eq:c}$ and solve for $\eqref{eq:f}$, I found that off-the-shelf math software (like Mathematica) wasn't very convenient to use. For me, the simplest approach was to just write a bit of Python code to simulate the solution directly. Taking $a=2,b=1$ as an example, it passes the numerical verification of $\eqref{eq:c}$, and yields the following solution:
The bent shape of the elliptical sheets when the two elliptical sheets are glued together
The bent shape of the elliptical sheets when the two elliptical sheets are glued together
The code is as follows:
#! -*- coding: utf-8 -*-
import numpy as np
a = 2
b = 1
h = 1e-6 # 步长
def Int(y, x):
"""自定义数值积分函数
"""
assert len(y) == len(x)
dx = np.diff(x)
_x = (x[:-1] + x[1:]) / 2
_y = (y[:-1] + y[1:]) / 2
s = np.cumsum(_y * dx)
s = np.interp(x, _x, s, left=0)
return s, x
def D(y, x):
"""自定义数值微分函数
"""
assert len(y) == len(x)
dy = np.diff(y) + 1e-10
dx = np.diff(x) + 1e-10
dy_dx = dy / dx
_x = (x[:-1] + x[1:]) / 2
dy_dx = np.interp(x, _x, dy_dx)
return dy_dx, x
def s2y():
"""弧长到椭圆y轴的映射(即h(s)。)
"""
y = np.arange(0, b, h)
ds = np.sqrt(1 + a**2 * y**2 / b**2 / (b**2 - y**2))
return Int(ds, y)[::-1]
y, s = s2y()
l = s[-1]
z = np.interp(l - s, s, y)
dx2 = 1 - D(y, s)[0]**2 - D(z, s)[0]**2
assert (dx2 > - 10 * h).all() # 判断是否能粘合,即在10倍步长的误差内是否恒大于等于0
dx = np.sqrt(np.clip(dx2, 0, a))
x = Int(dx, s)[0]
# 采样1/10的点去绘图
x = x[::10]
y = y[::10]
z = z[::10]
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
plt.clf()
fig = plt.figure(figsize=(8, 8))
ax = fig.gca(projection='3d')
ax.plot(x, y, z, color='blue')
ax.plot(x, - y, z, color='blue')
ax.plot(x, y, - z, color='green')
ax.plot(x, - y, - z, color='green')
ax.plot(x, np.zeros_like(x), z, color='red')
ax.plot(x, np.zeros_like(x), - z, color='red')
for i in range(0, len(x), 2000):
_ = ax.plot([x[i], x[i]], [y[i], - y[i]], [z[i], z[i]], color='blue')
_ = ax.plot([x[i], x[i]], [y[i], - y[i]], [- z[i], - z[i]], color='green')
for i in [-1, -1000]:
_ = ax.plot([x[i], x[i]], [y[i], - y[i]], [z[i], z[i]], color='blue')
if i != -1:
_ = ax.plot([x[i], x[i]], [y[i], - y[i]], [- z[i], - z[i]], color='green')
ax.set_xlim(0, a)
ax.set_ylim(-b * 1.2, b * 1.2)
ax.set_zlim(-b * 1.2, b * 1.2)
plt.show()
Summary
This post analyzes the problem of gluing together two elliptical sheets, with the core idea being to parametrize the curve equations using arc length. Although the article uses the ellipse as its example, this approach clearly generalizes to the problem of bending and gluing together any two planar curved surfaces — one just needs to find the arc-length parametric equation for each curve separately (i.e., replace $h(l-s)$ with the arc-length parametrization of the other curve), and then proceed with the integration in equation $\eqref{eq:f}$.
I've finally more or less resolved a rather interesting problem — proof that my mathematical curiosity and ability are still alive and well!
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.
