Releases: Vaniell0/spatium
Release list
Spatium 1.0.0
Geometry in any mathematical space, rather than in flat R^N.
The concept hierarchy — Set → MetricSpace → Manifold → RiemannianManifold → Surface — says what a space must provide. Define exp_map(),
log_map(), project() on your own struct, static_assert the concept,
and meshing, subdivision, geodesics, Voronoi, Riemannian optimization and
the physics integrators work on it. There is no per-space code anywhere,
because there is no per-space anything.
A contract is not a base class, so other people's types fit without
conversion: Dual<T> satisfies Scalar and substitutes into ordinary
code, which is how the exact Christoffel symbols get computed with no
hand-derived partials; Boost's 50-digit Real50 drops into the same slot;
chart_of() lets a space declared outside the library into the scene DSL.
Implemented behind those concepts: Euclidean spaces, spheres, hyperbolic
space, parametric and implicit surfaces, SO(3), SE(3), SPD(n) under two
metrics, Schwarzschild and Kerr, the heat method, IPC contact, XPBD,
variational and Lie-group integrators, wave equations, BVH, polynomial
solvers, arbitrary precision. 133 headers, 1070 tests.
The scene DSL describes a scene as spaces — torus(), offset(),
scatter() — rather than as meshes, so the description stays a graph
instead of becoming geometry. The donut in the gallery is 34 nodes
describing 2,021,984 objects: geometry worth 64,654,768 vertices stored as
39,272, about 1646×, rendered in under a gigabyte.
Using it
include(FetchContent)
FetchContent_Declare(spatium
GIT_REPOSITORY https://github.com/Vaniell0/spatium.git
GIT_TAG v1.0.0
)
FetchContent_MakeAvailable(spatium)
target_link_libraries(your_target PRIVATE Spatium::sdk)Header-only, no mandatory dependencies, Apache 2.0. examples/external-consumer/
is a complete independent project using exactly that snippet.
Versioning from here. The middle number moves when something is added
and existing code still compiles, the first when it does not, the last for
fixes. For a header-only library on concepts "breaking" is decidable —
your code either compiles or it does not — so that is the only question
the number answers.
What is missing is in the roadmap, which has 30
open [want] items and says why each is open. The nearest one worth
naming here: spatial acceleration is still flat, so queries are fast in
Euclidean space and merely correct off it.
I build this with Claude, which every commit says in its trailer.