The reflection of light rays in a cup of coffee
the curves obtained with b^n mod p

by Simon Plouffe
based on works done in the years 1974-79

Keywords Congruences, light rays, primitive roots, trigonometric sums, hypocycloids, epicycloids, binary expansion, n-ary expansion of 1/p.

Take a circle centered at (0,0), divide it into p parts and take 2^n mod p, if 2 is a primitive root of p then you will have this nice drawing of a cardioïd. That same figure can be obtained by a source at (1,0) that projects p rays at the p equally spaced points on the circumference. If the rays are reflected once then we obtain the curve. You may obtain the same curve by looking at a cup of coffee when you are under the sun during day, a thing that does not happen often in Vancouver (!). The following 6 images are the 5 first reflections of a source of light (the sun at point =infinity) that hits the side of a ideal cup of coffee and rebounds on the side 5 times. The number of rays are 257 in this case.

Figures obtained by reflecting a light source 5 times
on the side of a cup of coffee with 257 rays

Remarks :

Other templates, see the whole here : bluecircles.html

Reflections 6 to 11
Reflections 12 to 17
Reflections 18 to 23
Reflections 24 to 29
Reflections 30 to 35
Reflections 36 to 41
Reflections 42 to 47
Reflections 48 to 53
Reflections 54 to 59 ...figure of 10^n mod 257
Reflections 60 to 65 ...figure of 5^n mod 257.
Reflections 66 to 71
Reflections 72 to 77
Reflections 78 to 83
Reflections 84 to 89
Reflections 90 to 95
Reflections 96 to 101
Reflections 102 to 107
Reflections 108 to 113
Reflections 114 to 119
Reflections 120 to 125
Reflections 126 to 131 ...figures are repeating from that point after 128 reflections: (p-1)/2. =128, also the figure of 3^n mod 257.