Spirograph
Draws a hypotrochoid: the geometric curve you get from rolling one circle inside another with a pen offset from the center. The N/D ratio between the outer and inner radii sets how the loops nest. Think of it as the digital version of the toy.
Inputs
| Port | Type | Default | Range | Description |
|---|---|---|---|---|
| Size | Scalar | 1.0 | 0–1 | Overall scale |
| N | Scalar | 5 | 2–12 | Outer radius. Controls the bounding shape |
| D | Scalar | 1 | 1–8 | Inner radius. Controls how tightly the curve loops |
Outputs
| Port | Type | Description |
|---|---|---|
| Frame | Frame | Closed spirograph curve |
Ideas
- Set N=5, D=3 for a classic five-loop star. N=7, D=4 produces a tighter weave with more crossings.
- Animate D with a slow Phasor so the curve continually morphs between forms.
- Feed into Colorize with Hue driven by Phasor for a constantly shifting hypnotic pattern.
Tips
- The curve closes after
loops = D / gcd(N, D)revolutions. Coprime N and D give the longest, most intricate curves. - N=D is invalid (the inner circle equals the outer). The node clamps D to stay below N.