Spirograph Generator
Generate classic spirograph rosette patterns online. Simulate the hypotrochoid and epitrochoid curves a pen traces when a small circle rolls inside or outside a larger fixed circle. Layer up to three pens for a mandala, tune the three radii, watch the curve draw itself, then export as crisp SVG or PNG.
\( x(t) = (R - r)\cos t + d\cos\!\left(\dfrac{R - r}{r}\, t\right) \)
\( y(t) = (R - r)\sin t - d\sin\!\left(\dfrac{R - r}{r}\, t\right) \)
With R = 96, r = 36, d = 30, the curve closes after \( t \in [0, 2\pi \cdot 3] \).
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Spirograph Generator
The Spirograph Generator simulates the curves a classic Spirograph toy traces — beautiful, perfectly symmetric rosettes formed when a small circle rolls inside (or outside) a larger fixed circle while a pen on the small circle leaves a trail. The tool uses the real parametric equations behind hypotrochoids and epitrochoids, computes the exact loop period from the greatest common divisor of the two radii, and lets you stack up to three pens for a mandala effect. Tune three sliders, watch a live preview update in real time, then export the high-resolution curve as SVG or PNG.
How the Spirograph Math Actually Works
The dashed gray circle is the fixed circle of radius R. The violet disc rolls around its inside without slipping. A pen (orange) is mounted on the rolling disc at distance d from its center. As the rolling circle orbits, the pen leaves a curve. The animation here shows one full draw cycle on loop — your real spirograph below uses the same physics.
The key insight: the curve closes on itself only when the parameter angle returns to a multiple of \( 2\pi \) and the rolling circle has also made an integer number of full rotations. Both happen simultaneously after exactly r / gcd(R, r) orbits of the large angle. That is why this tool computes gcd(R, r) first — it guarantees the export is mathematically closed with no visible seam.
The Parametric Equations
$$x(t) = (R - r)\cos t + d\cos\!\left(\frac{R - r}{r}\, t\right)$$
$$y(t) = (R - r)\sin t - d\sin\!\left(\frac{R - r}{r}\, t\right)$$
If \( d = r \) the curve is a hypocycloid with sharp cusps (deltoid for 3 cusps, asteroid for 4). If \( d < r \) the curve has rounded petals (curtate). If \( d > r \) the petals form long loops (prolate).
$$x(t) = (R + r)\cos t - d\cos\!\left(\frac{R + r}{r}\, t\right)$$
$$y(t) = (R + r)\sin t - d\sin\!\left(\frac{R + r}{r}\, t\right)$$
If \( d = r \) the curve is an epicycloid with outward-pointing cusps (cardioid for one cusp, nephroid for two). If \( d < r \) the loops are curtate; if \( d > r \) they are prolate.
What Makes This Spirograph Generator Different
Counting the Petals: A Quick Guide
For a hypotrochoid, the number of lobes (or cusps, when \( d = r \)) equals \( R / \gcd(R, r) \). Some classic examples:
- R = 4, r = 1, d = 1 → asteroid (4 cusps). The classic "diamond with caved-in sides".
- R = 3, r = 1, d = 1 → deltoid (3 cusps). Also called the Steiner curve.
- R = 96, r = 36, d = 30 → 8-petal rosette. Because \( \gcd(96, 36) = 12 \) and \( 96 / 12 = 8 \).
- R = 105, r = 30, d = 72 → 7-petal star. Long, looping petals (because \( d > r \)).
- R = 120, r = 45, d = 48 → 8-lobe lace. Slightly curtate petals interweaving.
For an epitrochoid the same formula applies with the "outside" geometry — \( R / \gcd(R, r) \) outward-pointing cusps when \( d = r \).
A Short History
The mathematics dates to Albrecht Dürer in 1525, who studied epicycloids while drawing geometric ornament. Roemer (1674) and Bernoulli (early 1700s) formalized the parametric equations. The toy most people know — the brightly colored plastic gears branded "Spirograph" — was invented by British engineer Denys Fisher in 1965 and released by Kenner the following year. It became a worldwide hit and won Toy of the Year (UK) in 1967. Fisher first developed the gear system to design intricate spring-loaded mechanisms; the toy was a happy accident.
Today, hypotrochoids and epitrochoids show up far beyond crafts: in Wankel rotary engines (the rotor traces an epitrochoid), in guilloché engraving on banknotes and luxury watches, in Lissajous-style oscilloscope art, and in generative-art tooling for posters, embroidery, and laser cutting.
Real-World Uses for the Output
- Print and posters: a vector SVG at 8-petal rosette + gold palette + ivory paper makes a clean wedding-invitation flourish.
- Laser cutting and engraving: the closed curve is one continuous stroke, ideal for machine paths. Export SVG and import to LightBurn or RDWorks.
- Embroidery digitizing: the dense layered-pen mandala mode produces machine embroidery that runs cleanly without thread jumps.
- Math and art classroom: change r by one and watch the petal count change — a visual proof of why gcd matters in periodic functions.
- Generative art: the SVG export is editable. Open in Illustrator, fill the closed curve with a gradient, multiply-blend on a photo background.
- Logo flourishes: the monochrome palette + single-pen + small d gives a thin elegant rosette that scales perfectly on business cards.
Tips for Beautiful Designs
- Prime ratios = high lobe counts. Try R = 113, r = 30 (gcd 1, so 113 lobes — a dense lace). Then try R = 120, r = 30 (gcd 30, just 4 lobes — clean star).
- Push d past r for loops. When \( d > r \) the petals overlap themselves — try R = 90, r = 36, d = 80 for a flower with self-intersecting petals.
- Sub-unit d for soft petals. Small d values relative to r give a soft, "rounded daisy" look. Good for cards and gift tags.
- Layer pens for depth. Same R, r, d but pen layers = 3 instantly creates a 3D-feeling concentric design without changing anything else.
- Blueprint + ocean palette = engineering sketch. Use for tech-y illustrations and slide accents.
- Graph paper + monochrome ink = textbook diagram. Perfect for printable math worksheets.
Frequently Asked Questions
What is a spirograph mathematically?
A spirograph traces a hypotrochoid (small circle rolling inside a larger fixed one) or an epitrochoid (small circle rolling outside). The curves are described by parametric equations with three radii: R for the fixed circle, r for the rolling circle, and d for the pen's offset from the rolling circle's center.
What do R, r, and d mean exactly?
R is the radius of the big fixed circle, r is the radius of the small rolling circle, and d is the distance of the pen from the center of the rolling circle. If d equals r the pen sits on the rim and the curve develops sharp cusps; smaller d gives soft rounded petals (curtate); larger d gives long looping petals that overlap (prolate).
Why does the pattern always close into a loop?
The tool computes the greatest common divisor of R and r. The curve closes exactly after r / gcd(R, r) revolutions of the rolling circle, and the result has R / gcd(R, r) lobes of rotational symmetry. Using the gcd guarantees the pen returns to its starting point with no visible seam, regardless of whether R/r is rational or not (we treat them as integers).
What is the difference between hypotrochoid and epitrochoid?
Hypotrochoid uses a small circle rolling on the inside of a larger one — this is the classic Spirograph toy. Epitrochoid uses a small circle rolling on the outside. Hypotrochoids feel like rosettes pointing inward (petals toward the center); epitrochoids feel like flower or gear shapes pointing outward (petals away from the center). Wankel rotary engines use an epitrochoid as the rotor housing.
What is the multi-pen mandala mode?
Selecting two or three pen layers re-traces the same curve with progressively smaller d values in different palette colors. Because each pen has its own offset, the layers nest like petals inside petals, producing a mandala or rangoli effect from a single set of inputs. No layered compositing required — it is one math result rendered as multiple strokes.
Can I export the spirograph?
Yes. Download SVG gives a vector file that stays crisp at any size — ideal for printing, embroidery digitizing, vinyl cutting, or further editing in Illustrator or Inkscape. Download PNG renders the pattern as a high-resolution raster image, suitable for slides and social posts. Copy code puts the raw SVG markup on your clipboard for embedding in a webpage or sending in chat.
Is the tool free to use?
Yes. The Spirograph Generator is free, runs entirely in your browser, requires no signup, and never watermarks exports. The patterns you generate are yours to use in personal and commercial projects — printed, sold, remixed, or sewn into a quilt.
Why are some curves spiky and others smooth?
The spike count comes from R / gcd(R, r) — that integer is the number of lobes. The spike shape comes from d: when d equals r you get sharp cusps (a hypocycloid or epicycloid), when d is smaller you get rounded petals (curtate), and when d is larger than r the petals form long self-intersecting loops (prolate). Change one number at a time to feel the relationship.
How is this different from a Lissajous curve?
Lissajous curves come from independent sinusoidal motion on the x and y axes — x(t) = A sin(at + δ), y(t) = B sin(bt). Spirographs come from a small circle rolling around a big one without slipping. Lissajous patterns sit on a rectangular frame; spirographs sit on a circular frame. They share the family resemblance because both are periodic 2D curves, but the mechanism differs.
Why does the live preview look slightly different from the final result?
The live preview uses a lower sample count to stay responsive on every keystroke. The final result samples 900 to 7,200 points (scaled with curve complexity) for a crisper rendering. The two agree mathematically; the difference is just resolution.
Reference this content, page, or tool as:
"Spirograph Generator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-05-19