Manifold‐Discretization - kirklasalle/SpaceEntropyCompression GitHub Wiki
Multi-Dimensional Manifold Discretization & Spatial Tiling
In the SpaceEntropyCompression (SEC) framework, continuous geometric fields and curved manifolds are mapped onto discrete computational representations. This page details the mathematical formulation for discretizing multi-dimensional manifolds into hierarchical spatial complexes, establishing locality-preserving space-filling curves, and maintaining topological invariants without floating-point drift.
1. Continuous-to-Discrete Mapping Architecture
Let $(\mathcal{M}, g)$ be a continuous $d$-dimensional Riemannian manifold. To represent $\mathcal{M}$ within a deterministic computing environment, we discretize the manifold into a cell complex $\mathcal{K} = { \sigma_k }$ composed of $d$-dimensional polytopes:
$$\mathcal{M} \approx \bigcup_{k=1}^N \sigma_k, \quad \sigma_i \cap \sigma_j = \partial \sigma_i \cap \partial \sigma_j$$
Topological Invariant Preservation
The discretization operator $\mathcal{D}: \mathcal{M} \to \mathcal{K}$ must preserve global topological invariants. Specifically, the Euler characteristic $\chi(\mathcal{M})$ is maintained across the simplicial triangulation:
$$\chi(\mathcal{K}) = \sum_{p=0}^d (-1)^p \cdot N_p = \chi(\mathcal{M})$$
Where $N_p$ is the number of $p$-dimensional simplices in the discretization complex.
2. Adaptive Hierarchical Octree Partitioning
Because spatial compression density $\text{VCI}$ varies by orders of magnitude between matter cores and asymptotic void baselines, SEC applies an adaptive quadtree/octree recursive partition:
+-------------------------------------------------------------------+
| Root Bounding Domain |
| Level l = 0 |
+-------------------------------------------------------------------+
│
▼
+-------------------------------------------------------------------+
| Local Metric Curvature Gradient Evaluation |
| Check: || ∇ C_ij || > θ_threshold |
+-------------------------------------------------------------------+
│ │
[Condition Met] [Condition Not Met]
│ │
▼ ▼
+---------------------------------+ +-------------------------------+
| Recursive Cell Division | | Leaf Cell Stabilization |
| Level l+1 Subdivisions | | Fixed Quantization Node |
+---------------------------------+ +-------------------------------+
The refinement condition for cell $\sigma_k$ at depth $l$ is governed by the curvature gradient threshold $\theta$:
$$\int_{\sigma_k} | \nabla \mathcal{C}_{ij} |^2 , dV > \theta \cdot 2^{-2l} \implies \text{Subdivide}(\sigma_k)$$
This concentrates computational and bitstream resolution around intense metric compression wells while maintaining lightweight representation in peripheral reciprocal regions.
3. Locality-Preserving Space-Filling Traversal
To apply high-efficiency 1D entropy encoding to multi-dimensional manifolds, spatial coordinates must be linearized while preserving multi-dimensional neighborhood relationships. SEC supports both Morton (Z-order) and Hilbert space-filling curves:
Hilbert Curve Continuous Mapping
Let $\mathcal{H}_d: [0, 1] \to [0, 1]^d$ be the continuous surrogate Hilbert mapping. The discrete Hilbert index $h \in \mathbb{N}$ maps coordinates $(x_1, \dots, x_d)$ such that:
$$| \vec{x}_a - \vec{x}_b |_2 \le C \cdot | h_a - h_b |^{1/d}$$
This ensures that points adjacent in 1D memory remain adjacent in physical space, maximizing spatial cache locality and predictive coding accuracy.
| Feature | Morton (Z-Order) Curve | Hilbert Curve |
|---|---|---|
| Bit Manipulation Cost | Low (Bit-interleaving via BMI2 PDEP/PEXT) |
Moderate (State-table lookup / rotation) |
| Locality Preservation | Moderate (Periodic coordinate jump discontinuities) | Superior (Continuous path without diagonal jumps) |
| Target Execution Tier | Tier 0 (Constrained Edge / Microcontrollers) | Tier 1 & Tier 2 (Workstations / Hyperscale) |
4. Integer Lattice Normalization & Non-Conformal T-Junction Elimination
To avoid IEEE 754 floating-point platform non-determinism, all continuous coordinates are mapped to fixed-width integer lattices:
$$X_i = \left\lfloor \frac{x_i - x_{min, i}}{x_{max, i} - x_{min, i}} \cdot (2^{B} - 1) + 0.5 \right\rfloor, \quad B \in {16, 24, 32}$$
Conformal Mesh Integrity
When adjacent leaf cells exist at differing octree subdivision depths ($l$ and $l+1$), non-conformal boundaries (T-junctions) are eliminated via deterministic midpoint vertex snapping:
$$\vec{v}_{mid} = \frac{1}{2}\left( \vec{v}_1 + \vec{v}_2 \right)$$
This guarantees continuous manifold surfaces without topological holes or coordinate tearing during decompression.