What is a Bumpy Circle?
A bumpy circle starts with a plain circle of radius r and adds a sinusoidal ripple to that radius as a function of angle θ. The result is a smooth, closed wave-like silhouette with a controllable number of bumps, bump height, and bump sharpness. It is one of the simplest examples of a polar curve — where the distance from the center varies with direction.
The Polar Equation
r(θ) = radius + amplitude · sin(frequency · θ)^power
x(θ) = r(θ) · cos(θ)
y(θ) = r(θ) · sin(θ)
θ ∈ [0, 2π)
At each angle θ, the radius is the base circle radius plus a sinusoidal perturbation. The four shape parameters each have a distinct visual effect:
| Parameter | Effect | Default |
| radius | Base circle size (grid units) | 5 |
| amplitude | Peak height of each bump above the base circle; 0 = plain circle | 1.5 |
| frequency | Number of bumps per full revolution; integer values give perfect closure in one turn | 6 |
| power | Exponent applied to sin(…): 1 = smooth bumps & dents, even = bumps only (all outward), odd > 1 = pointed bumps with gentler dents | 1 |
Why Does the Curve Close?
For the shape to meet itself perfectly after one revolution, the sine term must complete a whole number of cycles in [0, 2π). With frequency = n (a positive integer), sin(nθ) completes exactly n full cycles as θ goes from 0 to 2π, producing n bumps and returning the radius to its starting value. Integer frequency values always give a perfectly closed curve in one revolution.
Effect of the Power Parameter
The power exponent changes the shape of each individual bump:
- power = 1: Standard sinusoid — peaks above the base circle alternate with troughs (dents) below. The most wave-like appearance.
- power = 2: sin2 is always non-negative, so all perturbations are outward bumps. The circle never dips inward. Bumps are slightly flatter and wider than power = 1.
- power = 3: More pointed bumps, with shallower but still-present dents.
- power = 4+: Bumps become increasingly narrow and spike-like, with the base circle growing more prominent between them.
Polar Curves in Mathematics
A polar curve r(θ) expresses distance from the origin as a function of angle. The bumpy circle is closely related to:
- Rose curves: r = cos(nθ) — petals from zero on the sides.
- Limacon: r = a + b·cos(θ) — an offset circle with a single smooth bulge or dimple.
- Rhodonea: generalized rose-like forms with varying petal widths.
SWBumpyCircle is like a “limaçon with multiple lobes” — a circle base with sinusoidal modulation at an arbitrary harmonic.
Using the Controls
- Radius — scales the overall circle. Breathing oscillates this value.
- Amplitude — how far the bumps protrude above the base circle. Set to 0 for a plain circle.
- Frequency — number of bumps around the circle. Use integer values (1–20) for perfect closure. Try frequency = 1 for a limaçon-like shape.
- Power — bump sharpness. 1 = smooth waves with dents, 2 = all-outward bumps, higher = spikier.
- Rotation — rotates the entire bump pattern CCW. With odd frequency, notice that bumps and gaps trade places at 180°.
- Show base circle — overlays a dashed circle at the base radius, making it easy to see exactly how far each bump protrudes above (or dips below) the unperturbed circle.
- Breathe (accordion) — sinusoidally oscillates the base radius, the bump amplitude, or both over time. Each has its own Speed and Amount sliders. Try combining with Spin and a low Background opacity for flowing spiral trails!
- Spin (accordion) — continuously rotates the bump pattern.
- Drag the center dot to reposition the figure.
- Click the canvas to toggle the grid on/off.
Keyboard Shortcuts
- s — Toggle spin
- b — Toggle breathe
- r — Factory reset
- q — Stop all animations