{"id":18636287,"url":"https://github.com/potocpav/general-relativity","last_synced_at":"2025-06-27T08:34:43.295Z","repository":{"id":200384973,"uuid":"704414278","full_name":"potocpav/general-relativity","owner":"potocpav","description":"General relativistic playground in 2+1 dimensions","archived":false,"fork":false,"pushed_at":"2023-11-05T07:26:44.000Z","size":1986,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T13:11:29.651Z","etag":null,"topics":["physics-simulation","webgl"],"latest_commit_sha":null,"homepage":"https://potocpav.github.io/general-relativity/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potocpav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.glsl-sandbox","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-13T07:56:14.000Z","updated_at":"2023-11-02T15:37:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"6db781fc-c1dd-4c69-8607-6b2eaf8fe53e","html_url":"https://github.com/potocpav/general-relativity","commit_stats":{"total_commits":66,"total_committers":1,"mean_commits":66.0,"dds":0.0,"last_synced_commit":"fd4cc48b5abd2e23e8530beeec346ad0e0c8e572"},"previous_names":["potocpav/general-relativity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/potocpav/general-relativity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potocpav%2Fgeneral-relativity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potocpav%2Fgeneral-relativity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potocpav%2Fgeneral-relativity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potocpav%2Fgeneral-relativity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potocpav","download_url":"https://codeload.github.com/potocpav/general-relativity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potocpav%2Fgeneral-relativity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262223230,"owners_count":23277605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["physics-simulation","webgl"],"created_at":"2024-11-07T05:29:00.448Z","updated_at":"2025-06-27T08:34:43.275Z","avatar_url":"https://github.com/potocpav.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# General Relativity Playground\n\nYou can play with general relativity [here](https://potocpav.github.io/general-relativity/).\n\n## Run\n\n```sh\nnpx browser-sync start --server\n```\n\n## How it works\n\n- [ ] Describe the architecture\n\nRaytracing along geodesics is done inside the GLSL fragment shader.\n\nObserver and object trajectories are computed in JS.\n\n## Plan\n\nInfra:\n\n- [x] Find a basis project, clone \u0026 adapt it\n- [x] Publish to GH Pages\n- [x] Refactor to use classes \u0026 files\n- [x] Link to GitHub\n- [ ] Improve menus\n\nRaytracing:\n\n- [x] Minkowski metric\n- [x] Observer motion\n- [x] Geodesics in polar coordinates in Minkowski metric\n- [x] Raytracing in curved coordinates\n- [x] Fix Lorentz Boost with non-orthonormal local coords\n- [x] Gravitational redshift\n- [x] Doppler redshift\n- [x] Object redshift\n- [x] Light attenuation\n- [x] Relativistic beaming\n- [x] Object relativistic beaming\n- [x] Adaptive RK step size for photons\n- [ ] Correct redshift visualization\n- [ ] HDR\n- [ ] Bloom\n\nObject dynamics:\n\n- [x] Schwarzschild metric for observer\n- [x] Schwarzschild metric for light\n- [x] Use a precise solver for photons\n- [x] Use a precise solver for motion\n- [x] Orbiting around a black hole test\n- [ ] Correct object orientation with parallel transport\n- [ ] Traversable event horizon\n\nTest objects, interaction:\n\n- [x] Display objects\n- [x] Object dynamics\n- [x] Correct length contractions for objects\n- [x] Compute object trajectories\n- [x] Interactive spaceship control\n- [x] Interactive object spawning\n- [x] Time controls\n- [ ] Control effects (redshift, beaming, etc.)\n- [ ] Scenario presets\n- [ ] Automatically generate floaters\n- [ ] Spatial indexing of object trajectories to improve performance of multiple objects\n\nScenario ideas:\n\n- Twin paradox\n- Gravitational time dilation\n- Light clocks\n- Light curving around massive objects\n- Falling into black hole, trying to fight gravity\n- Visiting a planet close to supermassive BH\n- Relativistic beaming \u0026 redshift (semaphore?)\n- Objects falling into BH, accretion disc\n- Expanding space-time?\n- Gaining energy from Kerr hole\n\n## Acknowledgements\n\nI 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)\n\nAmazing WebGL code and HTML template from Mr.doob was used as the basis of this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotocpav%2Fgeneral-relativity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotocpav%2Fgeneral-relativity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotocpav%2Fgeneral-relativity/lists"}