p5.js sketches

The beauty of the leapfrog algorithm. This sketch simulates the movement of several solar systems. Planets rotate around their respective suns following Newton's law of universal gravitation. As they move, the pixels from the background image are revealed. Click the screen to reset.

The background picture is from Alex Proimos.

For more details, check the source code or play with it at JSFiddle.