Tika is a high-performance, GPU-accelerated raytracer that simulates the visual and physical properties of a Kerr (Rotating) Black Hole. Unlike traditional Euclidean renderers that assume light travels in straight lines, Tika solves the Geodesic Equations of Motion for every pixel in real-time, integrating photon trajectories through the warped spacetime described by Einstein's Field Equations.
It is not a pre-rendered video. It is an interactive, physically accurate simulation running on your GPU.
-
Kerr Metric Geodesics: Supports partial spin (
$a < M$ ) and extremal ($a = M$ ) black holes. - Frame Dragging (Lense-Thirring Effect): Visualizes the "wrapping" of spacetime near the event horizon caused by the hole's rotation.
- Gravitational Lensing: Simulates extreme light bending, including the formation of Einstein Rings and Photon Spheres.
- Event Horizon Shadow: accurate rendering of the black hole shadow, which is larger than the event horizon due to photon capture orbits.
- Relativistic Doppler Beaming: The "approaching" side of the disk appears brighter and bluer (blueshift), while the "receding" side appears dimmer and redder (redshift).
- Gravitational Redshift: Light climbing out of the gravity well loses energy, shifting visible light into the infrared (visualized as dimming/reddening).
- Volumetric Density: Pseudo-volumetric noise-based density for a "cloud-like" accretion disk appearance.
- Blackbody Radiation: Temperature gradient simulation where inner rings are hotter (blue/white) and outer rings are cooler (red/orange).
- Hamiltonian Integration: Uses a symplectic Hamiltonian formulation instead of the standard Lagrangian approach to avoid computing computationally expensive Christoffel symbols.
- RK4 Integrator: 4th-Order Runge-Kutta numerical integration for high-precision trajectories.
-
Adaptive Step Sizing: Dynamically adjusts integration step size based on spacetime curvature (
$R$ ) to maintain performance without sacrificing accuracy near the horizon. - GLSL Compute: Entire physics pipeline runs in a massive parallel Fragment Shader.
| The Ergosphere | Extreme Redshift |
|---|---|
![]() |
![]() |
| The region where spacetime spins faster than the speed of light, forcing co-rotation. | Photons barely escaping the photon sphere, redshifted into invisibility. |
Note
Visual Artifacts: The vertical "rope" artifact at the poles is a Coordinate Singularity (
Tika operates in Boyer-Lindquist coordinates
Where the auxiliary functions are: $$ \Sigma = r^2 + a^2 \cos^2\theta $$ $$ \Delta = r^2 - 2Mr + a^2 $$
Solving the geodesic equation
The equations of motion are derived from Hamilton's canonical equations:
This reduces the problem to calculating partial derivatives of the inverse metric
To determine the color of a pixel, we trace the ray backwards from the camera to the accretion disk. The intensity
By Liouville's Theorem, the invariant intensity is
We approximate the emitted spectra as a Blackbody function
| Key / Input | Action | Description |
|---|---|---|
W, A, S, D
|
Boost | Accelerate the camera relative to the local frame (Lorentz Boost). |
Mouse |
Look | Rotate the camera's local sky frame. |
Scroll Up |
Increase Spin | Increase the black hole's angular momentum parameter ( |
Scroll Down |
Decrease Spin | Decrease spin towards Schwarzschild limit ( |
R |
Reset | Return to initial position and metric state. |
SPACE |
Pause | Freeze integration time (useful for screenshots). |
Tika/
├── assets/
│ ├── shaders/
│ │ ├── schwarzschild.frag # The heavy lifter: RK4 Integrator & Metric Solver
│ │ └── quad.vert # Full-screen quad pass
│ └── textures/ # Noise maps for accretion disk
├── src/
│ ├── Core/ # Windowing & Input (GLFW)
│ ├── Renderer/ # OpenGL State Management
│ └── Math/ # 4-Vector & Matrix helpers
├── build/ # Build artifacts
└── CMakeLists.txt # Build configuration
- Operating System: Linux (recommended) or Windows
- GPU: OpenGL 4.6 compliant (NVIDIA GTX 10-series or newer recommended for >60 FPS)
- Tools: CMake 3.20+, GCC/Clang (C++23 support)
# 1. Clone the repository
git clone https://github.com/KleaSCM/tika.git
cd tika
# 2. Configure project
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
# 3. Compile
make -j$(nproc)
# 4. Run
./Tika- Volumetric Clouds: Implement full volumetric raymarching for a nebula surrounding the hole.
- Kerr-Newman Metric: Add electric charge (
$Q$ ) to the simulation. - Wormholes: Implement the Ellis drainhole metric for visualising traverseable wormholes.
- VR Support: OpenXR integration for immersive event horizon experience.
- Gravitation - Misner, Thorne, Wheeler (1973). The "Bible" of GR.
- High-speed rendering of Kerr black holes - T. Müller (2014).
- Image of a spherical black hole with thin accretion disk - J.P. Luminet (1979).
MIT License. See LICENSE for details.
Author: KleaSCM (KleaSCM@gmail.com)



