Medial Axis Cookies
While baking cookies and dipping them in melted chocolate, I came across a familiar mathematical pattern. I would dip each cookie face first in a bowl of melted chocolate, lift it and let the chocolate drip, and then flip them over to dry. The places where the chocolate dripped formed ridges, almost like a skeleton of the shape. This skeleton depended on which cookie cutter we used.
The star cookies had five lines stemming from the center and reaching all the way to each of the five points.
The flowers were similar, but the rounded edges meant the ridges did not extend all the way to the end, but stopped somewhere in the middle of each petal.
The dinosaur cookies were a bit messier but had a clear curvy line from tail to head, and a couple other lines to meet it.



This behaves similarly to something called the medial axis or topological skeleton of a shape. You can think of it as describing where the middle of a shape is. If your shape is not perfectly symmetric, it can be more informative to have a full skeleton as the middle rather than a single central point.
So what is this skeleton actually? Each point on the medial axis is closest to at least two different points on the perimeter of the shape. For any point on the interior, you can find the point on the perimeter closest to it by imagining blowing up a small circle around it. The first point where the circle touches the edge is the closest point! For a point on the medial axis, this circle will touch the exterior in at least two points.
An incredible thing about the medial axis is if you have this skeleton as well as the distance to the exterior at each point, you can use it to reconstruct the original shape! For this reason, the medial axis is useful as a form of data compression, and was originally used in medical imaging.
How is this connected to our cookies? The chocolate drips by moving away from the perimeter--toward the other chocolate. It then pools at the spots where it meets the chocolate moving in the other direction. These ridges are formed roughly in the places that are equidistant from at least two spots on the perimeter. Of course, imperfections in the cookie, chocolate, and how you tilt it prevent this from being exact, but it is a cool approximation!
Try to make your own medial axis cookies sometime, and experiment with different shapes! The recipe I used was for Peppermint Bark Cookies by Sally's Baking Recipes, but anything dipped in chocolate works.
