Superformula
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jun 12, 2011
A single SVG path displays a superformula shape, with a set of slider controls for adjusting its parameters (m, n1, n2, n3, a, b) and buttons to switch among 21 named presets such as asterisk, circle, star, and heart. The code builds the shape using the d3.superformula plugin, which generates the path from a polar equation, and renders it via d3.svg.line. Sliders update the shape in real time through D3’s selection and property binding.
AI-generated descriptionChristophe Viau implemented a new shape type as a D3 plugin based on superformulas.
gpl-3.0 Licensed