Skip to content

Repository files navigation

Spacetime Simulator

An interactive web-based simulation and visualization tool for exploring the principles of General Relativity. This project brings Einstein's revolutionary theory to life through real-time computational simulations and immersive visualizations.

🌌 Overview

Spacetime Simulator demonstrates how massive objects curve spacetime and create gravitational effects. Visualize the warping of spacetime around celestial bodies, simulate planetary orbits, and explore the fascinating predictions of General Relativity through an intuitive, interactive interface.

✨ Features

  • Interactive Spacetime Visualization — Visualize how massive objects curve spacetime
  • Real-time Simulations — Run physics simulations showing gravitational interactions
  • Orbital Mechanics — Explore planetary orbits and gravitational dynamics
  • Educational Tool — Learn General Relativity concepts through interactive visualization
  • Responsive Design — Works across desktop and mobile devices

🛠️ Technology Stack

  • TypeScript (96.1%) — Type-safe application logic and simulations
  • CSS (3.4%) — Styling and responsive design
  • JavaScript (0.5%) — Runtime execution

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/berkemutluu/spacetime-sim.git

# Navigate to the project directory
cd spacetime-sim

# Install dependencies
npm install

# Start the development server
npm start

The application will be available at http://localhost:3000

📚 How to Use

  1. Launch the Simulator — Open the application in your web browser
  2. Set Parameters — Configure the mass and position of celestial objects
  3. Run Simulation — Start the simulation to see spacetime curvature in action
  4. Interact — Adjust parameters in real-time to observe changes
  5. Learn — Read explanations of the physics principles being demonstrated

🧬 Physics Background: General Relativity

Core Concepts

Spacetime Curvature

  • Massive objects curve spacetime around them
  • Objects follow geodesics (curved paths) through spacetime
  • This curvature is what we perceive as gravity

Einstein Field Equations

  • Relate spacetime curvature to the distribution of matter and energy
  • The mathematical foundation of General Relativity

Key Predictions

  • Gravitational time dilation
  • Black holes and event horizons
  • Gravitational waves
  • Perihelion precession

📁 Project Structure

spacetime-sim/
├── src/
│   ├── components/      # React/UI components
│   ├── simulations/     # Physics simulation logic
│   ├── utils/          # Utility functions
│   └── styles/         # CSS stylesheets
├── public/             # Static assets
├── package.json        # Dependencies and scripts
└── README.md          # This file

🤝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📖 Learning Resources

📝 License

This project is open source and available under the MIT License.

🙋 Support

For questions, issues, or suggestions, please:


Made with ❤️ for physics enthusiasts and curious minds everywhere. 🌌✨

About

An interactive web-based simulation and visualization tool for exploring the principles of General Relativity. This project brings Einstein's revolutionary theory to life through real-time computational simulations and immersive visualizations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages