Home▸Articles▸Generative Art & Algorithmic Patterns

The 2D Superformula: A Mathematical Masterpiece in Generative Art

A versatile mathematical formula that can generate a vast array of shapes, from simple circles to complex starfish and flowers.

mysimulator teamUpdated June 2026≈ 4 min read▶ Open the simulation

What is the 2D Superformula?

The 2D Superformula, introduced by Johan Gielis in 2003, is a generalization of the superellipse formula. It can describe a wide variety of shapes and curves found in nature and design. The formula is given as: r(θ) = (|cos(m*θ/4)/a|^n2 + |sin(m*θ/4)/b|^n3)^(-1/n1), where θ is the angle, m controls the number of lobes or petals, a and b are scaling factors, and n1, n2, and n3 control the shape's sharpness.

This formula has been used in various fields such as biology to model plant shapes, architecture for designing aesthetically pleasing structures, and computer graphics for generating realistic textures.

How Does It Work?

The 2D Superformula works by combining trigonometric functions with exponents. The parameter m determines the number of lobes or petals in the shape; a and b control the size along the x and y axes, respectively. n1, n2, and n3 modify the sharpness and overall form of the curve. By adjusting these parameters, one can create an almost infinite variety of shapes.

For example, setting m to 4 with appropriate values for a, b, n1, n2, and n3 will produce a starfish-like shape, while specific values might generate a perfect circle or an intricate flower pattern.

live demo · related simulation● LIVE

Why Is It Important?

The 2D Superformula is significant because it provides a single mathematical expression that can describe a wide range of shapes. This versatility makes it valuable in various applications, from scientific modeling to artistic design.

In nature, the formula can help explain why certain shapes are common among living organisms, such as the petals of flowers or the structure of seashells.

Real-World Applications

The 2D Superformula has numerous practical applications. In biology, it can be used to model plant shapes and growth patterns. In architecture, it aids in designing aesthetically pleasing structures with unique forms. Additionally, it is useful in computer graphics for generating realistic textures and models.

By understanding the underlying mathematics of the 2D Superformula, researchers and designers can create more accurate representations of natural phenomena or innovative designs that were previously difficult to achieve.

Frequently asked questions

How does changing m affect the shape?

Changing the value of m alters the number of lobes or petals in the shape. For example, setting m to 4 results in a starfish-like shape with four points.

What is the significance of n1, n2, and n3?

The parameters n1, n2, and n3 control the sharpness and overall form of the curve. They allow for fine-tuning the shape to achieve specific characteristics such as rounded or pointed edges.

Can the 2D Superformula generate all possible shapes?

While the 2D Superformula can generate a wide variety of shapes, it is not capable of generating every single possible shape. However, its versatility makes it a powerful tool for modeling many natural and designed forms.

Where did the concept come from?

The concept was developed by Johan Gielis as part of his research on geometric generalization in nature and design. It builds upon earlier work with superellipses but extends their capabilities to a broader range of shapes.

Try it live

Everything above runs in your browser — open 2D Superformula: Gielis Supershape Curve (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open 2D Superformula: Gielis Supershape Curve (2D) simulation

What did you find?

Add reproduction steps (optional)