Skip to content

berloop/endurance

Repository files navigation

Project L.A.Z.A.R.U.S

Lensing Anomalies & Zone Astrophysics for Research on Universal Singularities

A real-time relativistic visualization platform for exploring gravitational phenomena through physically-based simulations. Features accurate implementations of Schwarzschild black holes and Morris-Thorne wormholes using general relativity equations.

Project Banner

Overview

Project L.A.Z.A.R.U.S bridges theoretical physics and interactive visualization, making complex general relativity concepts accessible through real-time GPU-accelerated simulations. Built for students, educators, and astrophysics enthusiasts.

Key Features

  • Schwarzschild Black Hole Simulation
    • Real-time geodesic ray tracing in curved spacetime
    • Temperature-gradient accretion disk (3,000K - 12,000K)
    • Fractal Brownian Motion turbulence effects
    • Doppler shift and relativistic beaming
    • Interactive camera controls with auto-orbit mode
  • Morris-Thorne Wormhole Visualization
    • Three-parameter wormhole metric (ρ, a, M)
    • Dual rendering modes (geometry + ray-traced)
    • Einstein ring visualization
    • Multiple rotation patterns
  • Educational Resources
    • Comprehensive documentation
    • User guides and controls reference
    • Shader implementation explanations
    • Physics theory breakdowns

Tech Stack

  • Framework: Next.js 15 (React 18)
  • 3D Graphics: Three.js with custom GLSL shaders
  • Physics: Hamiltonian geodesic integration
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • UI Components: shadcn/ui
  • Audio: React H5 Audio Player
  • Language: TypeScript

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/berloop/endurance.git
cd endurance

# Install dependencies
npm install --legacy-peer-deps

# Run development server
npm run dev

Open http://localhost:3000 to view the app.

Build for Production

npm run build
npm start

Black Hole Parameters

  • Distance: Camera distance (7-14 Schwarzschild radii)
  • Angle: Horizontal orbital position (0-360°)
  • Incline: Vertical viewing angle (-90° to 90°)
  • FOV: Field of view (30-90°)
  • Auto-Orbit: Automatic camera rotation

Bloom & Visual Effects

  • Strength: Bloom intensity (0-3)
  • Radius: Bloom spread (0-1)
  • Threshold: Brightness cutoff (0-1)
  • Disk Temperature: Accretion disk color (3,000-12,000K)

Physics Implementation

Black Hole Ray Tracing

The simulation solves the geodesic equation in Schwarzschild spacetime using Euler integration. The acceleration term derives from the Schwarzschild metric, where light rays bend according to the curvature of spacetime around the black hole.

Accretion Disk

  • Temperature Gradient: T ∝ r-3/4 physical law
  • Doppler Shifting: Relativistic frequency shifts for rotating matter
  • Beaming Effects: Intensity scaling by velocity cubed
  • FBM Turbulence: Procedural noise for visual complexity

Wormhole Metric

Based on the Dneg three-parameter wormhole from Interstellar:

  • ρ (rho): Wormhole radius
  • a: Half-length parameter
  • M: Lensing strength

Audio Credits

Background music from Hans Zimmer's Interstellar Original Motion Picture Soundtrack:

  • "Day One (Interstellar Theme)"
  • "The Wormhole"
  • "Dust Bowl (Short Film Audio)"
  • Alessandro Roussel - ScienceClic Musique

Scientific References

  1. "Visualizing Interstellar's Wormhole"
    Oliver James, Eugénie von Tunzelmann, Paul Franklin, Kip S. Thorne
    American Journal of Physics 83(6): 486-499 (2015)
    DOI: 10.1119/1.4916949

  2. "Gravitational Lensing by Spinning Black Holes in Astrophysics, and in the Movie Interstellar"
    Oliver James, Eugénie von Tunzelmann, Paul Franklin, Kip S. Thorne
    Classical and Quantum Gravity 32: 065001 (2015)
    DOI: 10.1088/0264-9381/32/6/065001

  3. "The Science of Interstellar"
    Kip S. Thorne
    W. W. Norton & Company (2014)
    ISBN: 978-0393351378

  4. "Wormholes in Spacetime and Their Use for Interstellar Travel: A Tool for Teaching General Relativity"
    Michael S. Morris, Kip S. Thorne
    American Journal of Physics 56(5): 395-412 (1988)
    DOI: 10.1119/1.15620

  5. "Image of a Spherical Black Hole with Thin Accretion Disk"
    Jean-Pierre Luminet
    Astronomy and Astrophysics 75: 228-235 (1979)

Support

This project is completely free and open-source. If you find it valuable:

  • ⭐ Star the repository
  • 🐛 Report bugs or request features
  • 💝 Support development
  • 📢 Share with educators and students

License

MIT License - see LICENSE file for details.

Author

Created by Egret


"Dedicated to the brave men and women who gave their lives so we could begin again."

About

Dedicated to the brave men and women who gave their lives so we could begin again - Lazarus Missions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published