Skip to content

About

Deterministic, computing and raytracing engine for General Relativity, Post-Newtonian celestial mechanics, relativistic hydrodynamics, and polarized radiative transfer across curved spacetimes.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Relativity-Simulator

Deterministic simulation and ray-tracing engine for General Relativity, Post-Newtonian dynamics, relativistic hydrodynamics, and polarized radiative transfer in curved spacetimes.


Documentation Map

Primary references:


Key Features


Visual Overview

The visual renders and trajectory sequences below were recorded and generated using the integrated Capture Studio workspace widget.

Curved Spacetime Null Geodesic Ray-Tracing (Schwarzschild Metric, M = 60.00)

Schwarzschild Metric Flyby Trajectory (M = 60.00) Schwarzschild Metric Infall Trajectory (M = 60.00)


Building and Installation

Prerequisites

  • C++23 compiler: GCC 13+, Clang 16+, or MSVC 2022 (v19.36+).
  • CMake 3.25+.
  • OpenGL and GLFW (via CMake FetchContent).
  • Vulkan headers and loader (the compute context includes vulkan/vulkan.h); when no compute-capable device is present at run time, the CPU renderer is used.
  • glslangValidator (optional): used by CMake to compile the compute shader.
  • ffmpeg (optional, run time): video assembly in the Capture Studio.

Standard Build (Release with LTO)

cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON
cmake --build build --config Release -j $(nproc)

Profile-Guided Optimization (PGO) Build

Instrumented build

cmake -B build-pgo -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO_GENERATE=ON
cmake --build build-pgo --config Release -j $(nproc)
./build-pgo/headless_exporter --validate-benchmarks

Optimized build using profile data

cmake -B build-opt -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO_USE=ON
cmake --build build-opt --config Release -j $(nproc)

Running Test Suite

ctest --test-dir build --output-on-failure

Generating Installation Packages (CPack)

cd build
cpack -G TGZ
cpack -G DEB  # Linux Debian/Ubuntu
cpack -G RPM  # Linux Fedora/RHEL
cpack -G NSIS # Windows Installer

Quickstart

Interactive REPL Mode

./build/engine_cli

Available interactive commands (warp, step, set mass, status, etc.) are documented in the Interactive Terminal Commands (REPL) and navigation keybindings in Navigation & Viewport Keybindings.

Headless Batch Execution

./build/headless_exporter --validate-benchmarks
./build/headless_exporter --scenario scenarios/kerr_accretion_disk.yaml --output-dir ./output --width 3840 --height 2160

Command-line options are documented in Headless Batch Exporter, declarative scenario definitions in Declarative Scenario Definition, and validation targets in Verification Criteria & Benchmark Protocols.


Third-Party Assets and Image Licenses

Sky and panorama assets:

Earth and planetary assets:


License

This project is licensed under the MIT License. See LICENSE for details.

About

Deterministic, computing and raytracing engine for General Relativity, Post-Newtonian celestial mechanics, relativistic hydrodynamics, and polarized radiative transfer across curved spacetimes.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages