String art

Explanation

Curves obtained with n * t modulo p 0 1 2 3 4 5 6 7 8 9
Fig.1. n × 2 mod 10

I was inspired to make this application by the work of Simon Plouffe. This construction is known as the Cremona generation (after Luigi Cremona). The recipe is: divide p points equally over the circumference of a circle and number them from n = 0 to n = p-1. Then join points n and (n × t) mod p with a straight line segment (a chord). Variable t is a constant factor. We iterate over the times table of t and each time we take the result modulo p. In figure 1:

Envelopes of some of these pencils of lines form Epicycloids. If t = 2, the envelope forms a cardioid. If t = 3, the envelope forms a nephroid. If t = 4, the envelope forms a three-cusped epicycloid (see first 3 figures below).

Examples

2 mod 200 diagram 3 mod 200 diagram 4 mod 200 diagram 21 mod 200 diagram 29 mod 200 diagram 51 mod 200 diagram 68 mod 200 diagram 76 mod 200 diagram

Application canvas

Control panel

Animation:
  • mod
Stroke color:
Static: