Multiple circle inversions

Rendering successive reflections of a circle in a single inversion circle is not so interesting because reflection of the circle’s reflection is the circle itself; successive reflections simply bounce back and forth. It is more interesting to reflect a circle in several inversion circles. In the following program, five different inversion circles are depicted by thin red cylinders (the inversionCircles checkbox toggles visibility of these inversion circles), and the reflection circles are depicted by the closed disk comprising the circle’s interior and boundary.

Multiple reflection circles

The slider labeled n sets the recursion level for reflections. Set randomColors to assign each level its own random color. Setting n=0 yields just the original seed circle C whose position is set by dragging and whose radius is set by the GUI slider. Setting n=1 yields C together with its reflection in each inversion circle, five reflections in all. Setting n=2 yields 25 more reflection circles since each level 1 circle yields five reflections, although five of them coincide with C.