Circles and Squares
Lay a grid of dots over the plane, with a fixed step between neighbors. For each dot, compute and drop the fraction, then paint the dot light if the whole number is even and dark if it is odd. John Connett found this picture by accident, while working on a program to draw the Mandelbrot set.1
Points at the same distance from the center get the same value, so the rule draws one set of rings around one center, and when the dots are close together that is what you see. Spread the dots apart by raising the step between them.
Right: 90 by 90 dots. Left: a close-up of the marked part, with the true rings behind its dots.
More centers appear, in rows, each with its own rings, even though the formula has only one center. All the others are ghosts.
Rings get thinner as they go outward, and eventually they are thinner than the gaps between dots, so a row of dots skips over whole rings. At certain distances it skips exactly one ring per dot, or two, or any whole number, which puts each dot at the same place in its ring as its neighbor. That row looks as if it has stopped moving outward at all, and to the eye that is a center.
You can check this with the numbers. "Even or odd" is the same as keeping the remainder after dividing by . With a step of , moving dots along a row adds to , plus a constant. Dots sit at multiples of , so when is a whole number, this added amount is a whole multiple of , and the remainder ignores it. The rings around that dot are then an exact copy of the rings around the true center, except that light and dark swap when is odd. Most steps don't make a whole number, so the nearest dot gives a close copy instead.2
The close-up at a ghost center shows this directly: there is one full ring between neighboring dots, so every dot in that row lands at the same place in its ring.
The result is a moiré pattern, like the shimmer of two overlapping window screens, and it belongs to the dots rather than to the rings. MathWorld lists it among fractals, but it does not contain smaller and smaller copies of itself, because if you zoom in far enough you only see the rings.1
MathWorld writes the rule as .3 This page reads that as , with by default. Squarings in the controls repeats the square-and-remainder step, which folds each ring into many.
Further exploring
Sources and notes
- Aliasing Artifacts and Accidental Algorithmic Art, §3, on A. K. Dewdney's 1986 column about Connett's program. It also notes that the pattern is not technically a fractal.
- Calculation. With , a dot at grid position has value . Moving by dots gives . The article's makes , so is a whole number and only the constant remains. That is half a cycle when is odd, which swaps light and dark.
- Circles-and-Squares Fractal.