# The Universal Equation for Egg Shapes Unveiled

Written on

## Chapter 1: Introduction to Egg Geometry

The study of avian egg shapes has led to a significant breakthrough, with researchers recently publishing a comprehensive report in the Annals of the New York Academy of Sciences. Eggs are often regarded as an emblem of perfection in shape, honed through evolutionary processes to effectively encase an embryo and facilitate efficient laying. The shapes of bird eggs are categorized into four primary geometric forms: spherical, ellipsoidal, ovoid (a 3D shape formed by rotating an oval around one of its axes), and pyriform (pear-shaped). While the first three shapes have well-established mathematical definitions, the formula for the pyriform shape has only recently been derived.

The first video titled "The Ultimate Egg-quation" by Numberphile delves into the mathematical principles behind egg shapes, providing an engaging overview of this fascinating topic.

### Section 1.1: Understanding Egg Shapes

We have established geometric formulas for spheres and ellipsoids, so let’s delve into the ovoid shape. The equation for the oviform curve is articulated as follows in Equation 1:

Eq. 1: Formula for Oviform Curve

This equation has been applied by researchers specifically to chicken eggs. In this context, L denotes the egg's length, B signifies its maximum breadth, and w represents the distance between two vertical lines that correspond to the maximum breadth and the egg's half-length. Below, I have visualized some contours of this curve using Python and Matplotlib.

The left plot shows an elongated egg shape (where L/B=1.5) compared to the right plot (L/B=1.25). Both resemble real egg shapes! Notably, when w=0, the shape corresponds to an ellipse.

To generate the Oviform contours, the following code was utilized:

import numpy as np

import matplotlib.pyplot as plt

def xpart(x, L, b, w):

numerator = L**2 - 4*x**2

denom = L**2 + 8*w*x + 4*w**2

return (b**2/4)*(numerator/denom)

x = np.linspace(-3, 3, num=50)

y = np.linspace(-3, 3, num=50)

x, y = np.meshgrid(x, y)

X_l3_b2_w0 = xpart(x, l=3, b=2, w=0)

X_l5_b4_w0 = xpart(x, l=5, b=4, w=0)

Y = y**2

Next, I adjusted w to non-zero values (0.5 and 0.4) to examine how the contours changed.

It’s essential to note that researchers found the maximum allowable value for w is (L-B)/2; exceeding this threshold will distort the contours, making them unrepresentative of actual avian egg shapes.

### Section 1.2: The Pyriform Shape

"Pyriform" is defined as pear-shaped. The researchers in this study derived a formula for the pyriform egg shape, which is expressed in the following equation:

Eq. 2: Equation for Pyriform Egg Shape

The definitions for L, B, and w remain consistent with those used in the oviform equation. I employed a similar coding technique as before to visualize the contours of this equation, allowing us to compare the differences between the ovoid and pyriform shapes.

The visual demonstrates that the pyriform shape exhibits more conical characteristics compared to the ovoid shape.

## Chapter 2: Generalization of Egg Shapes

Figure 3 illustrates the geometric distinctions between the pyriform and ovoid shapes. Below is a combined visualization of both forms.

To achieve this combined plot, I implemented the following code:

def xpart(x, L, b, w): # oviform

numerator = L**2 - 4*x**2

denom = L**2 + 8*w*x + 4*w**2

return (b**2/4)*(numerator/denom)

def xpart_p(x, L, b, w): # pyriform

numerator = (L**2 - 4*x**2)*L

denom1 = (L**2 + 8*w*L - 4*w**2)*x

denom2 = 2*(L-2*w)*(x**2)

denom3 = 2*L*w**2

denom4 = (L**2)*w + L**3

denom = denom1 + denom2 + denom3 + denom4

return (b**2/4)*(numerator/denom)

The researchers pondered the white area between these shapes and contemplated, "How do we classify eggs whose contours fall within this area?" This inquiry led to the formulation of a universal equation applicable to all avian egg shapes, outlined below:

Eq. 3: Universal Equation for Avian Egg Shapes

This equation, while complex, underscores the intricacies involved in accurately describing egg shapes. Inspired by the report, I attempted to plot these contours myself, leading to the creation of this post. Although I am not affiliated with the researchers, I highly recommend reading the original paper, which is clear and accessible. Additionally, I discovered that the Gherkin design is influenced by the geometric form of eggs, which can withstand significant loads while minimizing material usage.

Stay curious and keep exploring!