Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/potocpav/general-relativity
- Owner: potocpav
- License: mit
- Created: 2023-10-13T07:56:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-05T07:26:44.000Z (about 1 year ago)
- Last Synced: 2024-01-28T05:00:42.841Z (11 months ago)
- Topics: physics-simulation, webgl
- Language: Jupyter Notebook
- Homepage: https://potocpav.github.io/general-relativity/
- Size: 1.89 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.glsl-sandbox
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 menusRaytracing:
- [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
- [ ] BloomObject 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 horizonTest 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 objectsScenario 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.