A rainbow forms when sunlight enters a raindrop, refracts, reflects off the inner back wall once, and refracts again on exit, splitting into colors. This light converges at an angle of ~42° from the point opposite the Sun.
The slider 'Sun height' moves the rainbow arc according to real geometry: as the sun rises above ~42°, the rainbow descends below the horizon and disappears.