Anıl Tuluy
Blog Post
Sunflower Spiral
Changing the Angle
FERMAT'S SPIRAL IN GAME DESIGN
ON APRIL 20, 2025 / GAME DEVELOPMENT
While working on a hyper-casual game I have learned how to implement the Fermat’s Spiral – a mathematical pattern – which is a brilliant way to achieve organic aesthetics with very little processing power.
The Fermat’s Spiral – which is also known as the parabolic spiral – is a widely used pattern to solve a common layout problem in game development. In the hyper casual project I have used the Fermat Spiral using the golden angle.
How it works:
In nature, the seeds of plants like sunflowers grow at a specific angle – roughly 137.5° – known as the Golden Angle. This angle allows the seeds to pack together perfectly without leaving any wasted space. When these seeds are all the same size and packed tightly, they naturally form a Fermat’s Spiral.
According to Wikipedia H. Vogel proposed the following model in 1979:
r=cn,
θ=n×137.508∘,
where θ is the angle, r is the radius or distance from the center, and n is the index number of the floret and c is a constant scaling factor.
This model can be used to draw a perfect sunflower pattern on a computer.
Use case:
In the context of my project, I used the Fermat’s Spiral for Dynamic Player Spawning and creating the crowd system. It worked well due to the “Equal Area Distribution”. The player characters were packed with a more uniform density. The game gave a more polished feel and was visually more satisfying.
FERMAT'S SPIRAL IN GAME DESIGN
ON APRIL 20, 2025 / GAME DEVELOPMENT
While working on a hyper-casual game I have learned how to implement the Fermat’s Spiral – a mathematical pattern – which is a brilliant way to achieve organic aesthetics with very little processing power.
The Fermat’s Spiral – which is also known as the parabolic spiral – is a widely used pattern to solve a common layout problem in game development. In the hyper casual project I have used the Fermat Spiral using the golden angle.
How it works:
In nature, the seeds of plants like sunflowers grow at a specific angle – roughly 137.5° – known as the Golden Angle. This angle allows the seeds to pack together perfectly without leaving any wasted space. When these seeds are all the same size and packed tightly, they naturally form a Fermat’s Spiral.
According to Wikipedia H. Vogel proposed the following model in 1979:
r=cn,
θ=n×137.508∘,
where θ is the angle, r is the radius or distance from the center, and n is the index number of the floret and c is a constant scaling factor.
This model can be used to draw a perfect sunflower pattern on a computer.
Use case:
In the context of my project, I used the Fermat’s Spiral for Dynamic Player Spawning and creating the crowd system. It worked well due to the “Equal Area Distribution”. The player characters were packed with a more uniform density. The game gave a more polished feel and was visually more satisfying.
