This project offers an interactive simulation of the N-body problem using Three.js. Explore gravitational dynamics between multiple bodies in a three-dimensional space, with the ability to add new bodies, modify simulation settings, and observe real-time interactions.
-
Clone the Repository
git clone https://github.com/NiniEdo/nbodyproblem.git
-
Install Dependencies
Navigate to the project directory:
cd nbodyproblem
Install the required packages:
npm install
-
Run the Simulation
Start the development server:
npm run dev
Open your browser and navigate to
http://localhost:5173
to view the simulation. -
Build for Production
To create a production build:
npm run build
The optimized files will be in the
target
directory. -
Run with Docker (Optional)
Build the Docker image:
docker build -t nbodyproblem .
Run the Docker container:
docker run -p 80:80 nbodyproblem
Access the simulation at
http://localhost
.
- Node.js (version 16 or higher)
- npm (comes with Node.js)
- Three.js: For 3D rendering.
- Vite: For development and build tooling.