How These Roses Work

Ever wonder how we can turn math into flower petals? These roses aren't just random shapes - they're built using some fascinating mathematical patterns that mirror how real roses grow.

We just have to image how a rose petal would curve and unfurl. Only two base measurements have been taken: the distance to the center x and how many times we have gone around t. Think of it as tracing a snail’s shell, but with more complex curves.

x moves from 0 to 1
t wraps around from 4π to 24π

All the magic comes when the petals are caused to curl. Each petal follows a tightening spiral of curvature:

p(t) = (π/2)e^(-t/8π)

This may seem intimidating, but in reality, each petal is being told how much to curl. The exponential decay (e^(-t)) reduces the curling of the petals as they open up – just like a real rose.

To enhance the natural appeal of the petals we include infinitesimal waves along their surface. Those subtle ripples create the difference between a flat boring petal and one that looks alive:

surface ripples = sin(15t)/150

Finally, we wrap it all together into coordinates that plot each point of the rose. The colors move fluidly from dark to light through the periodic boundary of height, giving that characteristic rose petal gradient observed in nature.

Pretty cool how a few equations can capture something as organic as a rose, right?