This program simulates day and night cycles by moving the mouse. Clicking starts the animation. It improves on the SunAndMoon lecture program by using the if statement to change between day and night once the sun has set.
Click below to download the source files for CelestialCycle.