Modular Times Table illustration

Modular Times Table

Place the numbers 0 to N−1 evenly around a circle, then draw a chord from every point i to (i×k) mod N. This single rule paints startling curves: the times table for 2 traces a cardioid, 3 a nephroid, and other multipliers weave nested petals and stars. Sweep the multiplier and the number of points, or animate the multiplier to watch one pattern morph smoothly into the next — the envelopes of the chords are the epicycloids hiding inside multiplication.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Each point i is joined to (i×k) mod N; the curve you see is the envelope those chords trace.
  • Multiplier 2 gives a cardioid, 3 a nephroid, and k gives an epicycloid with k−1 cusps.
  • Raising N sharpens the envelope because more chords sample the same underlying curve.
  • Runs 100% in your browser — simulations are computed locally on your device.