gekro
GitHub LinkedIn

Kaleidoscope

Draw on a round canvas that repeats every stroke 6, 8 or 12 times around the middle, with an optional mirror, eight colours and a rainbow.

Copies 16

Strokes 0

Colour

Draw with a mouse, a finger or a pen. With the keyboard, Tab to the canvas, move the cursor with the arrow keys (Shift moves further), and press Space to put the pen down or lift it. Escape drops a stroke you are drawing. On the canvas: F changes the folds, M turns the mirror on or off, G shows guides, W changes the width, [ and ] change the colour, U undoes, Y redoes and X clears. A short demo plays at first and stops as soon as you touch anything.

How it works
  • Each stroke you draw is repeated by turning it about the middle of the circle: 6, 8 or 12 times.
  • With Mirror on, each stroke is also flipped over first, so you get twice as many copies and every pattern becomes symmetrical left to right.
  • Strokes are smoothed by curving through the midpoints between the points your pointer reported, so they look the same when redrawn.
  • Rainbow changes colour every so often along the length of a stroke, going round all eight colours.
  • The picture is kept as a list of strokes, so Undo and Redo move one stroke at a time and resizing never blurs it.

As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.

© 2026 Rohit Burani · MIT · Built at gekro.com · View source ↗

Guide

How to play

Draw on the round canvas with a mouse, a finger or a pen. Everything you draw is repeated around the middle, so one wavy line becomes a flower or a snowflake. When the page opens, a short demo draws a pattern by itself. It stops the moment you touch the canvas or any control, and the canvas is yours and clear.

  • Folds. 6-fold, 8-fold and 12-fold set how many times a stroke is turned around the middle. Eight is the starting choice.
  • Mirror. When it is on, each stroke is also flipped over before it is turned, so you get twice as many copies and the whole pattern is the same left to right and top to bottom. With 8 folds and Mirror on there are 16 copies of every stroke. The number of copies is shown above the canvas.
  • Colour. Eight colours and a rainbow. Each colour button carries a number as well as a colour, and a spoken name such as “colour 3, green”. The rainbow moves on to the next colour each time the stroke has travelled 0.3 of the canvas radius, and goes round all eight.
  • Width. Thin, Medium or Thick. They are 0.012, 0.026 and 0.05 of the radius, so the lines look the same on a phone and on a big screen.
  • Guides. Dashed lines from the middle show where the pattern repeats. With Mirror on there are twice as many, because every mirror line is a place where the picture folds onto itself.
  • Undo, Redo, Clear. Undo and Redo move one stroke at a time through the last 120 pictures. Clear empties the canvas, and Undo brings it back.

The fold, mirror and width are saved inside each stroke when you draw it, so changing them never changes strokes that are already on the canvas.

With the keyboard

Press Tab until the canvas is selected. A ring appears, with a copy of the ring at every position the pattern repeats. The arrow keys move the cursor (Shift moves further) and Space or Enter puts the pen down, then lifts it again to finish the stroke. Escape drops a stroke you are in the middle of. While the canvas has the keyboard, F changes the fold, M turns the mirror on or off, G shows the guides, W changes the width, [ and ] change the colour, U undoes, Y redoes and X clears. The status line under the canvas says what each key did. Keys are only taken while the canvas is selected, so the page keeps working everywhere else.

Touch, motion and sight

Only the canvas stops the page scrolling under your finger. A second finger on it is ignored, and if the phone cancels a touch the stroke is dropped, not left half drawn. If your device asks for reduced motion, the demo is not played: the finished pattern is simply there until you touch the canvas. Nothing flashes.

How it works

The picture is a list of strokes, and each stroke is a list of points with a colour, a width, a fold and a mirror flag. Points are kept in unit coordinates: the middle is 0,0 and the rim of the circle is distance 1. Because the canvas is only drawn from that list, it can be sized to its box times the device pixel ratio (never more than 2), redrawn after a resize, or rebuilt after an undo without any blur.

Copies. Copy k of a stroke is the stroke turned by 2 pi k / n about the middle. With Mirror on, copies n to 2n - 1 are first reflected (y becomes minus y) and then turned. The page draws each copy by handing the canvas a matrix. The engine has a second way to the same answer, written with distance and angle from the middle, and it is used to place the keyboard cursor rings. The tests build explicit rotation and reflection matrices and compare both methods with them, for 6, 8 and 12 folds with Mirror on and off. They also check that the set of images of a point is the same set whichever image you start from, that every image keeps its distance from the middle, and the counts: n copies, 2n with Mirror, fewer for a point on the mirror line, and one at the middle.

Smoothing. Pointer events arrive as dots, so a stroke is drawn as a chain of pieces: a line from the first point to the midpoint of the first two, a quadratic curve for every point after that (from one midpoint to the next, with the point as its control), and a line to the last point. A stroke of n points gives n pieces. Control points, midpoints and the next control point sit on one straight line, so there are no corners at the joins; a test checks this with a cross product. The first n - 1 pieces never change when a point is added, so the page draws them while you move and draws the last one when you let go. That is why the curve you see being drawn is exactly the curve that comes back after an undo. A new point is only kept if it is at least 0.006 of the radius from the last one.

Limits. A stroke holds up to 1,500 points, the canvas up to 150 strokes and 24,000 points in all. When it is full the status line says so and Undo or Clear makes room.

CheckValue
Folds6, 8, 12
Copies of a stroke6, 8, 12, or 12, 16, 24 with Mirror
Undo history120 pictures
Strokes per canvas150
Points per canvas24,000
Rainbow step0.3 of the radius

Privacy and limits

Nothing is uploaded, nothing is stored on your device and there is nothing to download. The picture goes when you leave the page. Copy in the toolbar copies a one-line description of your canvas, not the picture.

  • Strokes are clipped to the circle, so lines that leave it are cut at the rim.
  • The rainbow follows the length of a stroke, so a short stroke is a single colour.
  • Pointer drawing is single touch. Pinch and two-finger gestures are not used.
All creative toys →

Free to play, no ads, nothing uploaded. These games are original and are not affiliated with any other game or brand.