Generative superformula vector-based line-art sketch for Processing, supporting both SVG and raster image output.
Uses some core code provided by Form+Code.
The superformula is a mathematical method for generating radial geometry with diverse, often organic-looking features. It is described by the following formula:
Where φ (phi) is an angle (between 0-359) and the resulting value r
being the radius of the geometry at that angle.
Here is how I like to think of the parameters and how they affect the resulting drawing:
a
seems to affect lateral stretchingb
seems to affect vertical stretchingm
affects the degree of rotational symmetry. Large values means more peaks/spikes.n1
,n2
,n3
all affect the concavity/convexity of spikes and how far they extend from the center. In tandem the can be used to make the form more 'bloated' or 'pinched'.
Following the example set by the original Form+Code example I also include the ability to run multiple iterations of the superformula with slightly changing (decaying) parameter values. You can control these parameters using the iterations
and decay
sliders.
Learn more about the superformula through:
- Daniel Shiffman's Coding Challenge #23: 2D Supershapes.
- Wikipedia entry on supershapes (also relevant is the superellipse page).
- Paul Bourke's article "Supershapes (Superformula)"
Space
= trigger a new iterations
= save an SVG containing all geometry on screeni
= save an image (PNG) of the current screenr
= randomize parametersn
= invert colorsh
= hide/show UIp
= save parameters to JSON filel
= load parameters from JSON file