← Back to Draw a Circle

About Draw a Circle

What Is It?

Pick a shape (a circle, or a regular polygon from the equilateral triangle up to the octagon) and click and drag (or drag a finger) to draw the best one you can. It can go anywhere in the drawing area, any size above a small minimum, in either direction, and for the polygons, turned any way you like. There is nothing to trace: whatever shape fits your drawing best is the one you are scored against.

Every shape but the square is drawn in a square box. The square is drawn in a circle instead, because in a square box it is too easy to run your finger along the edges.

Scoring

Your drawing is closed off with a straight line from where you finished back to where you started, shown dashed. If you overshoot the start, the extra bit past one full turn is ignored and shown greyed out. The closed drawing is then resampled into 512 points spaced evenly along it, so a stretch you drew slowly doesn't count any more than one you drew quickly.

Next comes the shape that fits those points best, found by a hill climb: it nudges the shape's numbers up and down, keeps whichever nudge helps most, and takes smaller and smaller nudges until none of them helps. For a circle the numbers are the center and the radius, and a quick algebraic fit gives the climb a good first guess.

A regular polygon is pinned down by its center and any one of its corners, so there the climb nudges four numbers: where the center is, and where the corner is from the center. But any of its corners would describe the same shape, so the corner is always the one that lies between straight right and one corner's share of the way round counterclockwise: a third for a triangle, a quarter for a square, an eighth for an octagon. A nudge that pushes it out past either end of that range hands over to the next corner round, which is already in it. It's the same shape, so the climb just carries on. The first guess is centered on the middle of your drawing, sized to match its length, and turned so its corners point where your drawing reaches furthest out. A few other turns are tried too, in case that guess is off, and the best of them wins.

Each point misses the fitted shape by some distance, and the error is the root mean square of those misses as a fraction of the shape's size. A circle's size is its radius, and a polygon's is the radius of the circle with the same perimeter, so a wobble costs the same whichever shape you are drawing. Squaring the misses means a few big ones, like a lopsided side, cost more than lots of small ones. Every 1% of error costs 5 points, so a 2% error scores 90 and a 20% error scores 0.

The fitted shape is drawn over yours, and your line is colored by how far each part of it strays: green on the shape, through yellow, to red.

Not Counted

A drawing isn't scored if it leaves the drawing area, is too small, doesn't go all the way around, goes around more than about one and a half times, or leaves a gap between its ends of more than half the shape's size.

Best Scores

Each shape keeps its own best score, shown above its drawing area and on the shape buttons. They are saved in your browser, so they stick around between visits. The button below erases all of them. It asks first, because this can't be undone.