Real-time n-body tree code in CUDA
4 million particles at 400ms per step with honest bottleneck analysis in the README.

C++ + OpenGL ES compiled to WASM—browser physics sim with predictive orbits.
Physics enthusiasts, visualization engineers, WebAssembly learners
three.js physics demos · Gravity Simulator (mobile apps) · Processing gravity sketches
I built HelioSim, a real-time N-body gravitational system simulator running directly in the browser via WebAssembly.
It’s written in C++ and uses OpenGL ES 3.0, GLFW, and Emscripten. The entire simulation and rendering pipeline runs in WebAssembly.
Features: - Real-time N-body gravitational simulation - Predictive orbit trails - Collision handling - Time controls (slow motion / fast-forward) - Dynamic body spawning
This was my first larger WebAssembly project, and I was honestly surprised how well modern browsers handle a C++ + OpenGL ES pipeline compiled to WASM.
One interesting challenge was bridging events and state between JavaScript and C++, which can honestly be a bit exhausting.
Source code:https://github.com/clemenskoprolin/heliosim
I’d love feedback on performance on other machines. Thanks!
4 million particles at 400ms per step with honest bottleneck analysis in the README.
Compare RK4, Euler, and Verlet integrators side-by-side in your browser.
Pure JS physics with CCD and shapecasting, skips the 3MB WASM tax.
Rendering 3D fluid dynamics as Unicode braille at 60fps is a genuine flex.
C++ rigid body simulation with end-to-end automatic differentiation for ML.
Basic gravity sim with nothing distinguishing it from existing tools.