Bouncing Gradient

This code consists of two main parts: it has three points that bounce around the screen, and it uses nested for loops to loop over every pixel in the window. For each pixel, it creates a color based on that pixel’s distance from the three bouncing points, and then draws the pixel in that color. This creates a gradient that transitions through different colors as the points bounce around.

This is a companion discussion topic for the original entry at