negative-mass-simulator

Newtonian Particle with Negative Mass Simulator

This project is a simple 2D N-body simulator written in JavaScript that explores the cosmological implications of negative mass. Inspired by the theories of Andrei Sakharov and Jean-Pierre Petit (Janus Model), it demonstrates how gravitational repulsion from negative mass can lead to the formation of “soap bubble” structures, filaments, and voids.

Negative Mass Simulator


🌌 Conceptual Overview

The simulation operates on the Janus interaction laws, which differ from standard Newtonian gravity by introducing a “twin world” interaction logic:

Interaction Result Effect in Simulation
m+ / m+ Attraction Standard galactic clumping
m- / m- Attraction Negative mass forms its own clusters
m+ / m- Repulsion Matter is pushed away

Because the matter of opposite sign repel each other, the negative mass occupy the centers of large cosmic voids, acting as the Great Repeller and carving out the “soap bubble” distribution of galaxies.


✨ Features


📚 References & Further Reading

Andrei Sakharov

Jean-Pierre Petit


🚀 Usage

1. Structure

Ensure your project has the following files:

2. Running Locally (CPU)

Simply open your cpu/index.html file in any modern web browser.

3. Running Locally (GPU)

Simply open your gpu/index.html file in any modern web browser. (make sure to enable WebGPU, e.g. chrome://flags/#enable-unsafe-webgpu).

4. Live preview

Run Live preview (CPU)

Run Live preview (GPU)

License

Apache v2.