Quatrefoils
I was reading The 99% Invisible City this evening, and there was a section on quatrefoils. Here's an example of a quatrefoil from Wikipedia.
There's no single shape known as a quatrefoil. It's a family of shapes that look something like the figure above.
I wondered how you might write a fairly simple mathematical equation to draw a quatrefoil. Some quatrefoils are just squares with semicircles glued on their edges. That's no fun.
Here's a polar equation I came up with that looks like a quatrefoil, if you ignore the interior lines.
This is the plot of r = cos(2/3).
Update: Based on a suggestion in the comments, I've written another post on quatrefoils using an equation that has a parameter to control the shape.
The post Quatrefoils first appeared on John D. Cook.