galaxy-sim

June 9, 2019 ยท View on GitHub

Link to live demo

A modified version of my final project for CS184: Computer Graphics at UC Berkeley in Spring 2019, developed by me and two other collaborators. See the project report with more information and references here, or the project video here. Note that this app is largely based on @magwo's fullofstars repo.


This is a real-time N-body particle simulation for the browser in WebGL. This simulation depicts gas clouds coalescing into stars orbiting around a black hole in the center of a disk galaxy. There are controls to change the opacity of materials, adjust the gravitational strength, choose from various cubemap backgrounds, and control a camera to pan and zoom across the scene.

In addition to the controls panel, there are various key commands:

KeyAction
1Switch to free orbit camera (default)
2Switch to guided camera
rToggle autorotation in orbit camera
lIncrease pixel display ratio (will appear sharper on high-resolution displays)
SPACEPlay/Pause simulation
hHide/show controls panel
a๐Ÿค”