andrewdcampbell / galaxy-sim

A real-time N-body galaxy formation simulation in WebGL.

Home Page:https://andrewdcampbell.github.io/galaxy-sim/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

galaxy-sim

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:

Key Action
1 Switch to free orbit camera (default)
2 Switch to guided camera
r Toggle autorotation in orbit camera
l Increase pixel display ratio (will appear sharper on high-resolution displays)
SPACE Play/Pause simulation
h Hide/show controls panel
a 🤔

About

A real-time N-body galaxy formation simulation in WebGL.

https://andrewdcampbell.github.io/galaxy-sim/


Languages

Language:JavaScript 94.7%Language:HTML 4.9%Language:Python 0.4%