C++ engine that computes shortest-path approximations on 3D meshes using Dijkstra, the Heat Method, and analytic geodesic solvers for parametric surfaces.
cmake -S . -B build -DBUILD_TESTING=OFF
cmake --build build --target geodesic_engine -jThe binary is written to ./main.
# Dijkstra (shortest path along mesh edges)
./main <start_id> <end_id> <model_path>
# Heat Method (mesh geodesic approximation)
./main <start_id> <end_id> <model_path> heat
# Analytics (surface-specific analytic solver)
./main <start_id> <end_id> <model_path> analyticsExample:
./main 0 100 ./assets/models/stanford-bunny.objResults are written as JSON to the current working directory (result.json, heat_result.json, analytics.json).
cmake -S . -B build-tests
cmake --build build-tests -j$(nproc)
ctest --test-dir build-tests --output-on-failureSample OBJ files live in assets/models/. You can generate higher-resolution variants with:
python -m tools.meshgen.generate --out ./assets/modelsTreats mesh vertices as nodes and edges as graph edges. Edge weights are Euclidean distances between adjacent vertices.
For general triangle meshes, solves:
- Heat equation for a short time
$t$ - Normalizes the temperature gradient to get vector field
$X$ - Solves Poisson equation
$\Delta \phi = \nabla\cdot X$ -
$\phi$ approximates geodesic distance; follow its gradient to extract a path
Closed-form or ODE solutions for special parametric surfaces (plane, sphere, torus, saddle).