Why "Spire"?
A spire or pinnacle is the tall, pointed ornament crowning Gothic cathedrals — the slender, upward-tapering finials on towers and buttresses that give buildings like Notre-Dame and Cologne Cathedral their characteristic silhouette. With default settings (rx = 3, ry = 5, p = 3), the SWSpire curve produces a tall, narrow shape with four sharp cusps pointing outward and four concave arcs sweeping inward — exactly the profile of a Gothic pinnacle seen in cross-section.
The Parametric Equations
SWSpire uses a signed-power form of trigonometric parametric equations:
x(t) = rx · sPow(cos(t), p)
y(t) = ry · sPow(sin(t), p)
where sPow(b, p) = sign(b) · |b|^p
and t ∈ [0, 2π)
The signed power preserves the sign of the base for any exponent, allowing the curve to occupy all four quadrants and trace a complete closed shape in one pass.
The Cartesian Super-Ellipse Form
These parametric equations trace the Lamé curve (generalized super-ellipse) with exponent n = 2/p:
(|x| / rx)^(2/p) + (|y| / ry)^(2/p) = 1
For odd integer values of p, the curve is a smooth, symmetric closed shape with four cusps at the cardinal axis tips.
Special Values of p
| p value | n = 2/p | Shape |
| 1 | 2 | Ellipse (circle if rx = ry) |
| 3 | 2/3 | Astroid / classic spire (4-cusp hypocycloid when rx = ry) |
| 5 | 2/5 | Sharper 4-pointed star |
| 7 | 2/7 | Very pointed 4-armed star |
| 9–15 | <2/9 | Approaching a 4-pointed cross / pinwheel |
History: Gabriel Lamé and Super-Ellipses
French mathematician and engineer Gabriel Lamé (1795–1870) introduced the general family of curves (|x|/a)^n + (|y|/b)^n = 1 while studying the mathematical theory of elasticity. These are now called Lamé curves or super-ellipses.
- For n = 2 (p = 1): standard ellipse.
- For n > 2 (p < 1): convex "squircle" shapes (bulge outward beyond the ellipse). Danish inventor Piet Hein popularized the squircle (n ≈ 2.5) in 1960s Scandinavian furniture and urban design — Sergels Torg plaza in Stockholm is a super-elliptical roundabout based on his design.
- For n < 2 (p > 1): concave shapes — the sides curve inward toward the center, creating the cusps that give SWSpire its pointed tips.
The Astroid: p = 3
The classic spire shape (p = 3, rx = ry = a) is the famous astroid (from Greek aster, star), also called a hypocycloid of 4 cusps. It was first described mathematically by Johann Bernoulli (1691) and studied by Leibniz. The astroid has a remarkable geometric property: it is the envelope of all right-angle trammels — if you slide a line segment of length 2a with its endpoints on the x– and y–axes, the curve it sweeps out is the astroid.
The Morph Animation
SWSpire's signature animation is Morph, which oscillates the power p sinusoidally. Because p can take fractional values (via the signed-power formula), the curve smoothly transitions between states — from an ellipse-like form, through the classic astroid, to sharper star shapes and back. The power display updates in real time. Combine Morph with low Background opacity for glowing ghosted trails!
Cusps at the Cardinal Tips
For any p > 1, both parametric derivatives dx/dt and dy/dt are zero at t = 0, π/2, π, 3π/2. This means the curve has four cusps at the points (±rx, 0) and (0, ±ry) — the sharp "spire tips" that inspired the name.
Using the Controls
- Radius X / Radius Y — independent half-widths of the bounding box. Set ry > rx for a tall spire; set them equal for a symmetric astroid; set rx > ry for a wide, squat star.
- Power (odd integer 1–15) — 1 is an ellipse; 3 is the classic spire; higher values make sharper, more cross-like stars.
- Rotation — rotates the figure. At 45° the cusps point diagonally, giving a fully symmetric 4-pointed star look.
- Morph (accordion) — sinusoidally oscillates the power value, creating a continuously morphing figure. Speed (Hz) sets cycles per second; Amount sets how much the power swells. Try Morph + low background + Spin for a mesmerizing animation.
- Spin (accordion) — rotates continuously. Combine with Morph for complex overlapping patterns.
- Drag the center dot to reposition the figure.
- Click the canvas to toggle the grid on/off.
Keyboard Shortcuts
- s — Toggle spin
- m — Toggle morph
- r — Factory reset
- q — Stop all animations
📐 New to parametric equations? Take the guided tour →