Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/potocpav/general-relativity

General relativistic playground in 2+1 dimensions
https://github.com/potocpav/general-relativity

physics-simulation webgl

Last synced: about 2 months ago
JSON representation

General relativistic playground in 2+1 dimensions

Awesome Lists containing this project

README

        

# General Relativity Playground

You can play with general relativity [here](https://potocpav.github.io/general-relativity/).

## Run

```sh
npx browser-sync start --server
```

## How it works

- [ ] Describe the architecture

Raytracing along geodesics is done inside the GLSL fragment shader.

Observer and object trajectories are computed in JS.

## Plan

Infra:

- [x] Find a basis project, clone & adapt it
- [x] Publish to GH Pages
- [x] Refactor to use classes & files
- [x] Link to GitHub
- [ ] Improve menus

Raytracing:

- [x] Minkowski metric
- [x] Observer motion
- [x] Geodesics in polar coordinates in Minkowski metric
- [x] Raytracing in curved coordinates
- [x] Fix Lorentz Boost with non-orthonormal local coords
- [x] Gravitational redshift
- [x] Doppler redshift
- [x] Object redshift
- [x] Light attenuation
- [x] Relativistic beaming
- [x] Object relativistic beaming
- [x] Adaptive RK step size for photons
- [ ] Correct redshift visualization
- [ ] HDR
- [ ] Bloom

Object dynamics:

- [x] Schwarzschild metric for observer
- [x] Schwarzschild metric for light
- [x] Use a precise solver for photons
- [x] Use a precise solver for motion
- [x] Orbiting around a black hole test
- [ ] Correct object orientation with parallel transport
- [ ] Traversable event horizon

Test objects, interaction:

- [x] Display objects
- [x] Object dynamics
- [x] Correct length contractions for objects
- [x] Compute object trajectories
- [x] Interactive spaceship control
- [x] Interactive object spawning
- [x] Time controls
- [ ] Control effects (redshift, beaming, etc.)
- [ ] Scenario presets
- [ ] Automatically generate floaters
- [ ] Spatial indexing of object trajectories to improve performance of multiple objects

Scenario ideas:

- Twin paradox
- Gravitational time dilation
- Light clocks
- Light curving around massive objects
- Falling into black hole, trying to fight gravity
- Visiting a planet close to supermassive BH
- Relativistic beaming & redshift (semaphore?)
- Objects falling into BH, accretion disc
- Expanding space-time?
- Gaining energy from Kerr hole

## Acknowledgements

I learned general theory of relativity from online lectures by Prof. Petr Kulhánek from CTU in Prague. Many thanks to him for skillfully balancing simplicity and completeness. [[youtube]](https://www.youtube.com/playlist?list=PLYYRBJzen2aCH6Mipd2zGG01MRVQZQ_V2) [[pdf]](http://www.aldebaran.cz/studium/otr.pdf)

Amazing WebGL code and HTML template from Mr.doob was used as the basis of this project.