Home › Fun & Games › Spirograph Generator

Spirograph Generator

A virtual spirograph: pick a fixed ring, a rolling gear and a pen hole, then watch the gear roll and trace the pattern. Stack layers in different colors and download your design as a PNG image or a scalable SVG.

Last updated:

Layers
    Advertisement
    Advertisement

    How to use the Spirograph Generator

    1. Choose Inside ring or Outside ring to roll the gear inside or around the fixed ring.
    2. Set the teeth of the fixed ring and the rolling gear, and the pen offset (how far the pen hole is from the gear's center). The preview updates instantly.
    3. Press Draw pattern to watch the gear trace the curve. Change the drawing speed or switch off the gears if you like.
    4. Press Add layer to keep the current pattern and start a new one on top in another color. Try Random pattern or a preset for ideas.
    5. Download PNG or SVG when you're happy. Pick a transparent background to use the design on top of other artwork.

    The math behind the spirograph

    The curves drawn here are roulettes: the path of a point attached to a circle that rolls along another circle. With a fixed ring of radius R, a rolling gear of radius r and the pen at distance d from the gear's center, the angle t of the gear around the ring gives:

    CurveGear positionEquations
    HypotrochoidInside the ringx = (R − r)cos t + d·cos(((R − r)/r)·t)
    y = (R − r)sin t − d·sin(((R − r)/r)·t)
    EpitrochoidOutside the ringx = (R + r)cos t − d·cos(((R + r)/r)·t)
    y = (R + r)sin t − d·sin(((R + r)/r)·t)

    Because gear teeth have the same size on both parts, the number of teeth is proportional to the radius, so the tooth counts can be used directly as R and r. The curve closes after t = 2π · r / gcd(R, r).

    Lobes and turns for common gear pairs

    Ring teeth (R)Gear teeth (r)GCDLobes (R ÷ GCD)Trips around the ring (r ÷ GCD)
    96361283
    105632153
    90303031
    1505735019
    14489114489

    Tips for striking designs

    • Layer the same gears with different pen offsets for a nested, flower-like look. Add layer does this automatically, then adjust from there.
    • Use thin lines for dense patterns. Pairs with a GCD of 1 to 3 draw hundreds of loops; a 0.5–1 px line keeps them crisp.
    • Try a dark background with bright colors or the rainbow pen for a neon effect.
    • Pen offset 100% gives sharp cusps: an inside gear then draws a star-shaped hypocycloid, and an outside gear a flower-like epicycloid.
    • Export SVG for print or plotting. Vector paths stay sharp at any size and can be recolored in any vector editor.

    Frequently asked questions

    How does a spirograph work?

    A toothed gear rolls without slipping around the inside or outside of a fixed toothed ring. A pen placed in a hole of the gear traces a looping curve. Rolling inside gives a hypotrochoid; rolling outside gives an epitrochoid. This generator uses the exact equations of those curves.

    What are the spirograph equations?

    For a gear of radius r rolling inside a ring of radius R with the pen at distance d from the gear's center: x = (R − r)·cos t + d·cos((R − r)t / r) and y = (R − r)·sin t − d·sin((R − r)t / r). Rolling outside: x = (R + r)·cos t − d·cos((R + r)t / r) and y = (R + r)·sin t − d·sin((R + r)t / r).

    How many points or loops will my pattern have?

    Divide both tooth counts by their greatest common divisor (GCD). The ring's result is the number of lobes, and the gear's result is how many times the gear travels around the ring before the curve closes. For 96 and 36 the GCD is 12, so you get 8 lobes after 3 trips around the ring.

    Why do some settings make simple shapes and others very dense ones?

    If the tooth counts share a large common divisor the curve closes quickly and looks simple. If they share few factors (for example 89 and 144) the gear must go around many times before the curve repeats, which creates a fine, lace-like pattern.

    Can I use the designs commercially?

    Yes. The patterns are generated from mathematical curves in your browser and the files you download are yours to use. The SVG is a vector file, so it can be scaled for printing, laser cutting or plotting without losing quality.

    What does pen offset over 100% mean?

    A pen offset of 100% puts the pen exactly on the gear's edge, which draws sharp points (a hypocycloid or epicycloid). Below 100% the pen sits inside the gear like a real spirograph hole, giving rounded loops; above 100% it's outside the gear, which adds extra loops.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Seamless Pattern GeneratorMake seamless dot, stripe, wave, grid, zigzag and check patterns. Export CSS, SVG or PNG.Online PaintDraw and paint in your browser: brushes, shapes, fill bucket, text, undo and PNG export.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.SVG Blob GeneratorGenerate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path.Falling Sand GameSandbox with sand, water, fire, plants, lava and more that flow, burn, grow and react. Save your scene.Mandala GeneratorCreate random or custom mandalas with layers and symmetry, then print coloring pages as PDF or SVG.Draw a Perfect Circle TestDraw a circle freehand and get a roundness score with a heatmap of where you went off.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Coin FlipFlip a coin online: heads or tails, multiple coins and stats.Yes or No WheelSpin the wheel for a yes or no answer to any question.Random Name GeneratorGenerate random first and last names by gender and origin.Random Team GeneratorSplit a list of names into random, balanced teams.Dice RollerRoll a D6 or any RPG dice (D4 to D100) with totals and history.Random Number GeneratorPick random numbers in any range, unique or lottery-style.Random Letter GeneratorPick random letters from the alphabet, with vowel, case and no-repeat options.Random Country GeneratorPick random countries with flags, capitals, population and area.Random Date GeneratorGenerate random dates between two dates, with weekday and format options.Picker WheelSpin a wheel to pick a random name or choice.Random Dog PicturesRandom dog photos and fun dog facts.Random Cat PicturesRandom cat photos and fun cat facts.Random Parrot PicturesRandom parrot photos and bird trivia.Dog Web StumbleJump to a random dog website.Cat Web StumbleJump to a random cat website.Parrot Web StumbleJump to a random parrot website.Random Animal GeneratorGet a random animal with its class, habitat and a fun fact, with filters.Random Movie PickerCan't decide what to watch? Pick a random film by genre, decade and runtime.Random Food PickerCan't decide what to eat? Spin a cuisine wheel and get a dish that fits your diet.Truth or Dare GeneratorDraw clean truth or dare questions for family, teens or parties, with player turns.Baby Name GeneratorDiscover 1,700+ baby names filtered by gender, origin and letter, and save favorites.Would You Rather QuestionsRandom would you rather dilemmas in five categories. Vote and see your A/B split.Pet Name GeneratorFind the perfect name for a dog, cat, bird or bunny by species, style and coat color.Fantasy Name GeneratorCreate elf, dwarf, orc, dragon and other fantasy names from race-specific syllable rules.Random Question GeneratorRandom conversation starters: icebreakers, deep, funny, work-friendly and kids questions.Band Name GeneratorInvent band names for 14 music genres, or blend two genres, with album titles too.Writing Prompt GeneratorRandom story starters, first lines, characters, settings, twists and poem prompts in 11 genres.Drag Name GeneratorFind your drag queen or drag king name: puns built from your own name in seven styles.Rapper Name GeneratorTurn your name into a rap name in seven styles, from Lil and MC to trap, drill and emo rap.Lottery Number GeneratorSecure random quick picks for Powerball, Mega Millions, EuroMillions, Lotto and custom games.Superhero Name GeneratorInvent original superhero names with powers, an origin story and a weakness.Secret Santa GeneratorDraw Secret Santa names with exclusions and send everyone a private reveal link, no sign-up.Pirate Name GeneratorGet swashbuckling pirate names from your first name, plus ship names, in four styles.Raffle DrawPaste names, add extra tickets and draw one or many random raffle winners with confetti.Couple Name GeneratorBlend two names into ranked ship names and couple names, from Brangelina-style to overlaps.Random Card DrawShuffle a 52-card deck and draw one or more random playing cards, with jokers and history.Tournament Bracket GeneratorMake single or double elimination brackets for 2-64 players, click winners to advance, print.Random Fact GeneratorGet random fun facts about animals, space, the body, history, science, food and more.Random Joke Generator200+ clean, family-friendly jokes: dad jokes, puns, knock-knock jokes and more. Tap to reveal.Team Name GeneratorGenerate catchy team names for sports, work, trivia nights and gaming, with your own keyword.Business Name GeneratorTurn a keyword and industry into brandable business name ideas, with a .com check link.Charades GeneratorRandom charades words by category and difficulty, with a round timer, team scores and kids mode.Pictionary Word GeneratorRandom family-friendly drawing words by difficulty, with a round timer and team scores.Random Emoji GeneratorGenerate random emojis by category, copy them in one click, or roll an emoji story prompt.Halloween Costume Idea GeneratorRandom Halloween costume ideas for kids, adults, couples, groups and pets, with DIY lists.Random Activity GeneratorBored? Get a random thing to do from 300+ ideas, filtered by place, budget, age and time.Random Drawing Idea GeneratorGet random drawing prompts by difficulty and theme, with a color palette and sketch timer.Random Seating Chart GeneratorPaste a class or guest list and get a random seating chart with keep-apart rules.Tongue Twister GeneratorRandom tongue twisters by difficulty and sound, plus a maker for any letter, read aloud.Random Quote GeneratorGet random inspirational, funny and famous quotes with author and source; copy or share as an image.Random Website GeneratorJump to a random fun, useful or interesting website from a hand-picked, family-friendly list.Random Workout GeneratorPick a goal, equipment, muscles and time to get a random workout with sets, reps and rest.Date Night Idea GeneratorRandom date night ideas by budget, at home or out, season and vibe. Save your favorites.Elf Name GeneratorFind your Christmas elf name from your first name and birth month, then print a name tag.Most Likely To QuestionsRandom 'who is most likely to' questions for parties and classrooms with a kid-safe filter.Random Gift Idea GeneratorGet random gift ideas by recipient, age, interests and budget, then shortlist and copy them.Random Hobby GeneratorFind a new hobby by budget, indoor or outdoor, solo or social, with simple steps to start.Random Location GeneratorRandom coordinates on land, in a country or near you, on a map with the nearest city.Random Object GeneratorRandom everyday objects with icons for drawing prompts, guessing games and teaching.Random Song GeneratorPick a random popular song by decade and genre, then play it on your favorite music service.
    See all 63 Random Generators & Pickers →