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.