Skip to content

Interactive simulation of the N-body problem using Three.js

Notifications You must be signed in to change notification settings

NiniEdo/nBodyProblem

Repository files navigation

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.image

Installation

  1. Clone the Repository

    git clone https://github.com/NiniEdo/nbodyproblem.git
  2. Install Dependencies

    Navigate to the project directory:

    cd nbodyproblem

    Install the required packages:

    npm install
  3. Run the Simulation

    Start the development server:

    npm run dev

    Open your browser and navigate to http://localhost:5173 to view the simulation.

  4. Build for Production

    To create a production build:

    npm run build

    The optimized files will be in the target directory.

  5. 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.

Requirements

  • Node.js (version 16 or higher)
  • npm (comes with Node.js)

Dependencies

  • Three.js: For 3D rendering.
  • Vite: For development and build tooling.

About

Interactive simulation of the N-body problem using Three.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published