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

This application is based on the work of Simon Plouffe. 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:

If t = 2, the curve forms a cardioid. If t = 3, the curve forms a nephroid.

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: