Narushin et al. [Ann. N.Y. Acad. Sci. 1505, 169–177 (2021), doi:10.1111/nyas.14680] give a formula for the profile of a bird's egg that covers the four classes of egg shape they consider: circular, elliptical, oval and pyriform (pear-shaped, with one end much more pointed than the other). Pyriform eggs are laid by, among other birds, the common guillemot and Brünnich's guillemot, each of which lays a single egg on a bare cliff ledge. The shape was long thought to make the egg roll in an arc, rather than off the ledge, when it is knocked; Birkhead et al. found instead that pyriform eggs are more stable on the sloping ledges on which guillemots often breed [The Auk 135, 1020–1032 (2018), doi:10.1642/AUK-18-38.1].
Formula
The formula, equation (5) of the article, is
where \(x\) is the position along the long axis of the egg, measured from its centre, from \(-L/2\) at the blunt end to \(L/2\) at the pointed end, and \(y\) is the distance of the profile from this axis. \(L\) is the length of the egg, \(B\) its breadth at \(x = -w\) and \(D_{L/4}\) its diameter at \(x = L/4\), a distance \(L/4\) from the pointed end; these are marked in the figure below.
Equation (5) is a weighted average of two simpler profiles (Supplementary Material S3 of the article): Hügelschäffer's model of an ovoid egg, \(y_\mathrm{H}\), which is an ellipse when \(w = 0\) (the first line of equation (5), and equation (1) of the article), and a pyriform profile, \(y_\mathrm{c}\) (equation (3) of the article):
where \(D_\mathrm{H}\) and \(D_\mathrm{c}\) are the diameters of the two profiles at \(x = L/4\).
Show derivationHide derivation
The two profiles are
The square root in the last line of equation (5) is therefore \(y_\mathrm{c}/y_\mathrm{H}\) and, if the fraction in its second line is written \(k\), equation (5) is
At \(x = L/4\), the denominator of the fraction in \(y_\mathrm{c}\) is \(\tfrac{L}{4}\left(5.5L^2 + 11Lw + 4w^2\right)\), and the diameters of the two profiles are
Dividing the numerator and the denominator of \(k\) by \(2\sqrt{5.5L^2 + 11Lw + 4w^2}\sqrt{L^2 + 2wL + 4w^2}\) gives \(k = (D_\mathrm{H} - D_{L/4})/(D_\mathrm{H} - D_\mathrm{c})\).
The weight \(k\) gives the egg the diameter \(D_{L/4}\) at \(x = L/4\): \(k = 0\) gives Hügelschäffer's model and \(k = 1\) the pyriform profile. The formula is intended for \(0 \le k \le 1\), i.e. \(D_\mathrm{c} \le D_{L/4} \le D_\mathrm{H}\), and for \(0 \le w \le (L - B)/2\), beyond which Hügelschäffer's model no longer resembles an egg. Both profiles have the breadth \(B\) at \(x = -w\). This is the maximum breadth of Hügelschäffer's model, but the pyriform profile is up to 2.2% broader, a little closer to the blunt end.
Implementation
The program below implements equation (5) as this weighted average, and raises an error if \(k\) is not between 0 and 1. It draws the profiles of four eggs, one of each class of shape, and the surface of the pyriform egg, made by rotating its profile about the \(x\)-axis, since an egg is a solid of revolution about its long axis.
"""The profiles of birds' eggs, from the universal formula for egg shape of
Narushin et al., Ann. N.Y. Acad. Sci. 1505, 169 (2021), doi:10.1111/nyas.14680.
x is the position along the long axis of the egg, measured from its centre,
from -L/2 at the blunt end to L/2 at the pointed end; L is the length of the
egg, B its breadth at x = -w and DL4 its diameter at x = L/4.
"""
import matplotlib.pyplot as plt
import numpy as np
def y_hugelschaffer(x, L, B, w):
"""Hügelschäffer's model of an ovoid egg, equation (1) of the article."""
return B / 2 * np.sqrt((L**2 - 4 * x**2) / (L**2 + 8 * w * x + 4 * w**2))
def y_pyriform(x, L, B, w):
"""The pyriform profile, equation (3) of the article."""
P = (2 * (L - 2 * w) * x**2 + (L**2 + 8 * L * w - 4 * w**2) * x
+ 2 * L * w**2 + L**2 * w + L**3)
return B / 2 * np.sqrt(L * (L**2 - 4 * x**2) / P)
def y_egg(x, L, B, w, DL4):
"""The universal egg profile, equation (5) of the article: the weighted
average of equations (1) and (3) whose diameter at x = L/4 is DL4."""
DH = 2 * y_hugelschaffer(L / 4, L, B, w)
Dc = 2 * y_pyriform(L / 4, L, B, w)
k = (DH - DL4) / (DH - Dc)
if not 0 <= k <= 1:
raise ValueError(f"DL4 must lie between {Dc:.4g} and {DH:.4g}.")
return (1 - k) * y_hugelschaffer(x, L, B, w) + k * y_pyriform(x, L, B, w)
def plot_profile(ax, x, y, **kwargs):
"""Draw the profile y(x) and its mirror image as one closed outline."""
ax.fill(np.concatenate((x, x[-2:0:-1])), np.concatenate((y, -y[-2:0:-1])),
fill=False, **kwargs)
# B, w and DL4, in units of L, for eggs of the four classes of shape.
EGGS = {
"Circular": (1, 0, np.sqrt(3) / 2),
"Elliptical": (0.7, 0, 0.6),
"Oval": (0.75, 0.05, 0.6),
"Pyriform": (0.58, 0.17, 0.37),
}
L = 1
# The points are closer together towards the ends of the egg, where the
# profile is steepest.
x = -L / 2 * np.cos(np.linspace(0, np.pi, 200))
if __name__ == "__main__":
fig, axes = plt.subplots(nrows=2, ncols=2)
for ax, (name, (B, w, DL4)) in zip(axes.flat, EGGS.items()):
plot_profile(ax, x, y_egg(x, L, B, w, DL4), ec="k", lw=1.5)
ax.set_aspect("equal")
ax.axis("off")
ax.set_title(name)
plt.show()
# The egg is a solid of revolution about the x-axis: its surface is made
# by rotating the profile of the pyriform egg through 2π about this axis.
B, w, DL4 = EGGS["Pyriform"]
phi = np.linspace(0, 2 * np.pi, 100)
X, Phi = np.meshgrid(x, phi)
R = y_egg(X, L, B, w, DL4)
Y, Z = R * np.cos(Phi), R * np.sin(Phi)
fig = plt.figure()
ax = fig.add_subplot(projection="3d")
ax.plot_surface(X, Y, Z, color="r", alpha=0.3, rstride=10, cstride=10)
ax.plot_wireframe(X, Y, Z, color="k", rstride=10, cstride=10, lw=1)
# Equal limits and a cubic box give the three axes the same scale.
for set_lim in (ax.set_xlim, ax.set_ylim, ax.set_zlim):
set_lim(-L / 2, L / 2)
ax.set_box_aspect((1, 1, 1), zoom=1.6)
ax.axis("off")
plt.show()