Dicing an Onion, the Mathematically Optimal Way

https://pudding.cool/2025/08/onions

sal Aug 12, 2025 · 1 min read
Dicing an Onion, the Mathematically Optimal Way
Share this
A note on the standard deviation

In this article when we say standard deviation it refers to relative standard deviation. Relative standard deviation here is the ratio of the standard deviation compared to the average piece size. Because relative standard deviation is a percentage, we can make unitless comparisons about how tightly our piece sizes cluster around the average—we don’t have to make any assumptions about the exact dimensions of our onion.

How do you find the size of an onion piece?

Onions and onion pieces are 3D objects with volumes, but we’re analyzing areas of 2-dimensional cross-sections to simplify the math.

When making vertical cuts, we can obtain the area of an onion piece in the bottom layer by calculating the area under a circular curve in the piece’s horizontal range. When we want the area of an onion piece in an upper layer, we take the area under its higher circular curve and subtract the area under its lower circular curve.

The calculation for radially cut onion pieces is generally the same. However, cutting radially produces diagonal lines. We also add the area under the diagonal line to the left of the piece, and subtract the area under the diagonal line to the right of the piece.