Superformula Art With a Shape Grammar
Map parameter roles, curate named shape neighborhoods, sample stable contours, and preserve the complete edition recipe.
Superformula art can move from rounded flowers to sharp stars, pinched cells, and almost mechanical parts with only a handful of parameters. That expressive range is also the trap: unconstrained random values produce a folder of novelties rather than a coherent visual language.
This guide turns the polar equation into a shape grammar with named parameter roles, stable sampling, curation rules, and an edition receipt that preserves why each family belongs.
The supporting vocabulary is bounded parameter ranges, finite polar samples, curvature-aware contour, edition grammar. Each term serves the same search intent: build a curated family of superformula shapes without relying on blind random parameter search.
My position is that a parameter space is material, not authorship. The creative work is choosing neighborhoods, naming what changes there, and building constraints that let variation stay recognizably related.
- Symmetry
- Exponent
- Amplitude
- Family rule
Superformula art starts with parameter roles
The symmetry count, angular multipliers, and exponents create different visible changes and should not share one random range. The Gielis superformula paper introduces a generic geometric transformation that generalizes circular and superelliptic forms. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Hold all but one parameter fixed
- Render labeled contact sheets
- Describe each visible transition
- Mark unstable neighborhoods
The measurement I keep is silhouette features associated with each parameter. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is several parameters change at once and the cause disappears. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is every grammar rule names the parameter responsible for its visible role. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
Sample the polar curve safely
Negative bases, near-zero cosine terms, and extreme exponents can create non-finite radii or explosive spikes. The MDN SVG path reference documents the vector path element used to render sampled polar contours. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Use absolute trigonometric terms
- Clamp unsafe denominators
- Reject non-finite radii
- Close the contour explicitly
The measurement I keep is finite-radius rate and maximum radius. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is one sample sends the viewBox toward infinity. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is every accepted point is finite and inside the declared radius envelope. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
Build named shape neighborhoods
A useful grammar groups bounded ranges for each parameter into families such as petals, shields, cells, or bursts. The HTML Canvas path drawing documents joining sampled coordinates into a continuous drawable subpath. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Choose anchor presets by eye
- Define narrow mutations
- Lock symmetry where needed
- Name each family's visual promise
The measurement I keep is within-family similarity and between-family distinction. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is mutations jump families unpredictably. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is a viewer can group a contact sheet without seeing parameter labels. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
| Option | Observed signal | Verdict |
|---|---|---|
| Uniform random | wide novelty; weak relation | reject |
| One preset | coherent; no range | control |
| Named neighborhoods | varied; family resemblance | ship |
Control sampling by curvature
Uniform angular steps waste points on quiet arcs and undersample sharp corners. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Start with a stable dense sample
- Estimate turning angle
- Subdivide high-curvature spans
- Simplify within export tolerance
The measurement I keep is maximum contour deviation at target size. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is sharp points flatten or quiet curves become heavy files. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is the vector stays inside a stated pixel or millimeter tolerance. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
Test finite and closed contours
A deterministic fixture should reject invalid radii and confirm the first and last sampled positions meet. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Test known circle-like parameters
- Test extreme exponents
- Assert finite coordinates
- Measure closure distance
The measurement I keep is invalid-point count and closure error. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is the renderer silently emits NaN path commands. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is invalid presets fail before export and accepted contours close inside tolerance. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
Runnable artifact. Save this bounded check as superformula-generative-art.test.mjs and run node --test superformula-generative-art.test.mjs. Expected output: PASS: superformula samples stay finite.
import assert from "node:assert/strict";
import test from "node:test";
const radius=(t,m=6,n=2)=>Math.pow(Math.pow(Math.abs(Math.cos(m*t/4)),n)+Math.pow(Math.abs(Math.sin(m*t/4)),n),-1/n);
test("finite samples",()=>{for(let i=0;i<128;i++)assert.ok(Number.isFinite(radius(i/127*Math.PI*2)));console.log("PASS: superformula samples stay finite");});
Compose with nesting and counterforms
Repeating a supershape at several scales can create rhythm, but identical scaling often collapses into a decorative target. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Vary scale nonlinearly
- Rotate selected layers
- Protect internal negative space
- Use stroke hierarchy
The measurement I keep is counterform area and layer separation. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is nested contours merge into an unreadable dark mass. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is each layer remains distinguishable in the smallest intended output. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
- MapMap
Identify each parameter's visible role.
- SampleSample
Use bounded neighborhoods and stable angles.
- CurateCurate
Reject degeneracy and duplicate silhouettes.
- ComposeCompose
Apply stroke, nesting, crop, and edition rules.
Curate beyond silhouette novelty
Two parameter sets can look nearly identical; a good edition rejects duplicates and asks how shapes work together on a page. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Normalize scale and rotation
- Compare contour descriptors
- Review contact sheets in sequence
- Keep an explicit rejection folder
The measurement I keep is duplicate rate and compositional variety. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is the edition contains many mathematical variants but few visual ideas. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is each selected plate contributes a distinct role to the collection. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
Publish the grammar, not just seeds
A seed cannot explain parameter bounds, family selection, sampling, stroke, palette, crop, and rejection rules. For this superformula art decision, the useful move is to expose the hidden variable before optimizing the attractive output. That turns a technique into an operating rule another person can inspect.
Use four concrete actions:
- Serialize family definitions
- Record seed and preset IDs
- Save sampling tolerance
- Name export and curation rules
The measurement I keep is clean regeneration of accepted and rejected plates. I record the input, configuration, observation window, and rejected control together. That bundle matters because a single favorable number cannot explain whether the method improved the system or merely moved cost into a quieter place.
The failure I deliberately provoke is the chosen shape returns but its family context is lost. A check that never produces this bad case is too polite to prove its guardrail. I prefer the smallest counterexample that makes the break unmistakable, then I scale the experiment only after the mechanism is visible.
My decision rule is the edition can regenerate its selection process, not only one contour. This is a proposed boundary from hands-on prototyping and systems review, not a claim about an undisclosed client deployment. A different workload, material, device, or visual goal can choose another answer, but it should publish the evidence that changed the boundary.
The useful version is bounded
Superformula art gains a voice when parameters become a named grammar. A smaller set of understood neighborhoods produces more coherent variation than an enormous undirected search.
Keep labeled studies and rejected contours beside the edition recipe. They show the aesthetic boundary and make the collection easier to extend without diluting it.
Continue with signed distance field typography, seeded randomness for generative systems, strange attractor posters, reaction-diffusion art. Those field notes deepen adjacent implementation choices without turning this page into several articles at once.