AnglerFish: Galaxy Evolution Simulator

AnglerFish: Galaxy Evolution Simulator

Anglerfish Photo © 2014 Rebeccarawrr. Licensed under CC-BY.

AnglerFish is a galaxy evolution simulator. It illustrates the way galaxies form and change over time. Press the space bar or reload the page to reset the simulation.

Minimum Requirements

  • Latest Firefox, Chrome, Opera, or Safari (Does not work with Samsung Browser, IE or Edge)


I created this small project after seeing a few videos by The Coding Train, a p5js evangelist. One of his videos was a coding challenge for creating purple rain in honor of the late, great, musician Prince. That video intrigued me and got me interested in learning more about p5js. I highly recommend his videos.

I thought it would be interesting to try to rapidly prototype orbit, so I gave it a shot! The simulation uses the formula for gravitational force and acceleration. Pixels are scaled in kilometers. On each update the particles sum the forces exerted on them by all other particles, then the sum of those forces are applied.

Comments are closed.