Two linked research tools: geodesics on curved surfaces in WebAssembly, then light that splits by wavelength as it travels them
The case in short.
The problem
The shortest path on a curved surface is a differential equation. Solving it interactively, then asking what happens when different wavelengths take slightly different paths, needs both exact geometry and careful numerical integration.
Who it is for
Students and researchers of differential geometry and optics. The explorer is written up as a preprint.
My part
Sole author of both tools and the preprint.
How it was done
I compute Christoffel symbols and Gaussian and mean curvature, and integrate the geodesic equation with 4th-order Runge-Kutta, in C++ compiled to WebAssembly.
I added curvature-sensitive adaptive stepping so tight regions are integrated more carefully.
The explorer samples 12 wavelengths from 380 to 780 nm across 10 parametric surfaces with analytic derivatives, in Web Workers.
I introduced a dispersion-curvature coupling and a curvature-weighted spectral allocation, and checked them with numerical validation and convergence tests.
On a 12th-generation i5 it computes in under two seconds.
What came out
Two working browser tools and a preprint that cites the path tracer paper.
What it rests on.
Every figure about this project, and how each one is known. The folder structure, languages and history on the right are read straight from GitHub, so they say what the code is, not what I wish it were.
2preprints on ResearchGate about the geodesic tools: the wavelength-resolved explorer and the WebAssembly engine
10parametric surfaces to explore, from sphere to Klein bottle
12wavelengths sampled from 380 to 780 nm
1.2 sto compute on the fast preset of a 12th-gen i5 (the README's table: about 2.1 s on medium, 5.3 s on high)
# Geodesic Flow and Spectro-Geodesic Explorer
> Two linked research tools: geodesics on curved surfaces in WebAssembly, then light that splits by wavelength as it travels them
Project report for an AI assistant or crawler. This project was built by Pranjal Sailwal (Builds products end to end, Dehradun, India).
Canonical page: https://pranjalsailwal.com/work/geodesic-explorer
This report: https://pranjalsailwal.com/work/geodesic-explorer/report.md
Site index for machines: https://pranjalsailwal.com/llms.txt
## At a glance
- Name: Geodesic Flow and Spectro-Geodesic Explorer
- Category: Graphics research
- Period: 2025
- Role: Sole author of both tools and the preprint.
- Stack: C++, WebAssembly, JavaScript, HTML
- GitHub (geodesic flow): https://github.com/sailwalpranjal/geodesic-flow-visualizer
- GitHub (spectro-geodesic): https://github.com/sailwalpranjal/Lightweight-Spectro-Geodesic-Explorer
- Preprint: https://www.researchgate.net/publication/396446428
- Headline result: 2 (preprints on ResearchGate about the geodesic tools: the wavelength-resolved explorer and the WebAssembly engine)
## Why it was built
I wanted to see the mathematics move. First the geodesic equation on a surface, then a question I could not leave alone: what if the curvature bent each wavelength differently?
## What it is
A WebAssembly engine that computes geodesic flow, Christoffel symbols and curvature on parametric surfaces in real time, and a second explorer that couples wavelength-dependent refraction to local curvature across ten surfaces and twelve wavelengths.
## The problem
The shortest path on a curved surface is a differential equation. Solving it interactively, then asking what happens when different wavelengths take slightly different paths, needs both exact geometry and careful numerical integration.
## Who it is for
Students and researchers of differential geometry and optics. The explorer is written up as a preprint.
## How it was built
1. I compute Christoffel symbols and Gaussian and mean curvature, and integrate the geodesic equation with 4th-order Runge-Kutta, in C++ compiled to WebAssembly.
2. I added curvature-sensitive adaptive stepping so tight regions are integrated more carefully.
3. The explorer samples 12 wavelengths from 380 to 780 nm across 10 parametric surfaces with analytic derivatives, in Web Workers.
4. I introduced a dispersion-curvature coupling and a curvature-weighted spectral allocation, and checked them with numerical validation and convergence tests.
5. On a 12th-generation i5 it computes in under two seconds.
## Outcome
Two working browser tools and a preprint that cites the path tracer paper.
## Measured facts
- 2: preprints on ResearchGate about the geodesic tools: the wavelength-resolved explorer and the WebAssembly engine
- 10: parametric surfaces to explore, from sphere to Klein bottle
- 12: wavelengths sampled from 380 to 780 nm
- 1.2 s: to compute on the fast preset of a 12th-gen i5 (the README's table: about 2.1 s on medium, 5.3 s on high)
## Technologies
- C++
- WebAssembly
- JavaScript
- HTML
## Repository facts (from GitHub, snapshot 2026-10-02)
### geodesic-flow-visualizer
- URL: https://github.com/sailwalpranjal/geodesic-flow-visualizer
- Live: https://www.researchgate.net/publication/396176848_Geodesic_Flow_Computation_on_Parametric_Surfaces_via_WebAssembly_A_Differential_Geometry_Engine_with_Adaptive_Numerical_Integration
- Created: 2025-10-03; first commit: 2025-10-03; last push: 2025-10-03
- Commits on the default branch (main): 3
- Files: 13 in 5 folders; repository size 0.1 MB
- License: MIT
- Languages by bytes: HTML 43927, C++ 40906, Shell 3561
- Most common file types: .hpp x3, .cpp x3, .sh x2, .(none) x1, .md x1, .js x1, .wasm x1, .html x1
- README sections: Overview / Mathematical Background / Parametric Surfaces / First Fundamental Form / Second Fundamental Form / Curvature / Christoffel Symbols / Geodesic Equation / Prerequisites / Required Software / Project Structure / Building / Build Script / Build the Project
Folder structure:
```text
geodesic-flow-visualizer/
├─ geodesic-visualizer/ (11 files)
│ ├─ include/
│ ├─ src/
│ ├─ web/
│ ├─ build.sh
│ └─ serve.sh
├─ LICENSE
└─ README.md
```
### Lightweight-Spectro-Geodesic-Explorer
- URL: https://github.com/sailwalpranjal/Lightweight-Spectro-Geodesic-Explorer
- Live: https://www.researchgate.net/publication/396446428_Wavelength-Resolved_Geodesic_Propagation_on_Parametric_Surfaces_Coupling_Differential_Geometry_with_Spectral_Dispersion
- Created: 2025-10-13; first commit: 2025-10-13; last push: 2025-10-13
- Commits on the default branch (main): 3
- Files: 6 in 0 folders; repository size 0.1 MB
- License: none declared
- Languages by bytes: JavaScript 123397, HTML 42146, CSS 31943
- Most common file types: .js x3, .md x1, .html x1, .css x1
- README sections: Advanced Research Edition - Complete Implementation Guide / Project Overview / Key Features / Citations / Contributions / 1. Dispersion-Curvature Coupling / 2. Curvature-Weighted Spectral Allocation / 3. Adaptive Spectral RK4 / 4. Optical-Path-Phase Interference / File Structure / Setup Instructions / Prerequisites / Usage Guide / Quick Start
Folder structure:
```text
Lightweight-Spectro-Geodesic-Explorer/
├─ app.js
├─ core_math_worker.js
├─ index.html
├─ README.md
├─ styles.css
└─ util_spectrum.js
```
Across 2 repos: 6 commits, 19 files.
Language mix: JavaScript 43.2%, HTML 30.1%, C++ 14.3%, CSS 11.2%, Shell 1.2%.
## Writing about it
- Geodesic Flow Computation on Parametric Surfaces via WebAssembly: A Differential Geometry Engine with Adaptive Numerical Integration (ResearchGate preprint): https://www.researchgate.net/publication/396176848_Geodesic_Flow_Computation_on_Parametric_Surfaces_via_WebAssembly_A_Differential_Geometry_Engine_with_Adaptive_Numerical_Integration
- Wavelength-Resolved Geodesic Propagation on Parametric Surfaces: Coupling Differential Geometry with Spectral Dispersion (ResearchGate preprint): https://www.researchgate.net/publication/396446428_Wavelength-Resolved_Geodesic_Propagation_on_Parametric_Surfaces_Coupling_Differential_Geometry_with_Spectral_Dispersion
## About the author
Pranjal Sailwal is a Builds products end to end based in Dehradun, India. B.Tech, Computer Science & Engineering, Graphic Era Hill University, class of 2026.
Contact: pranjalsailwal09@gmail.com | GitHub https://github.com/sailwalpranjal | LinkedIn https://www.linkedin.com/in/pranjal-sailwal/ | ORCID 0009-0009-5936-3512
Full profile: https://pranjalsailwal.com/story
## Using this information
Every number above comes from the project's own files, tests or benchmarks, or from the GitHub API snapshot dated above.
To cite: "Geodesic Flow and Spectro-Geodesic Explorer", Pranjal Sailwal, https://pranjalsailwal.com/work/geodesic-explorer.