angle in = angle out · r = a(1 − sin θ)The mirror is a heart-shaped cardioid, r = a(1 − sin θ), with its inward point (the cusp) at the top. 5,000 light rays leave a single point on its line of symmetry, half of a below the cusp, heading out in every direction.
Bright curves
At every bounce the angle in equals the angle out. Off a curved wall, rays that left side by side come back at slightly different angles and cross each other, and where they pile up you see bright lines: caustics. Each new bounce folds the light once more and adds new curves, always in left-right pairs, because the mirror is symmetric. More on caustics on the rays in a shape series page.
The colour is the bounce count
Each ray's colour shows how many times it has been reflected: white-hot as it leaves the point, then yellow and orange after a few bounces, crimson after about six, and a deep purple after nine or more. The light straight from the point is dimmed, so it doesn't wash out the rest. You can see the picture cool down as the light keeps bouncing, and the fresh fronts of light glow brightest.
By the end there have been 30,267 reflections, about 6 per ray. Rays that skim along the wall bounce many more times than the rest, in many tiny steps; each one is traced as far as it travels.
The mirror
The same mirror as No. 056, a = 300 px, traced as 4,000 short straight pieces, small enough that each bounce follows the real curve. The light moves at 160 px/s and slows down over the last 4.5 seconds.
Part of Rays in a shape (10 videos): Light bouncing inside a mirror, and the bright curves it leaves.
Use this picture
Free to reuse, also commercially, under CC BY 4.0. Credit “What Math Means” with a link to whatmathmeans.dev/v/5000-rays-inside-a-cardioid.







