Commit d79505a
committed
feat(hpc): PhiSpiral256 golden-spiral location codebook (anchor layer)
Implements the anchor layer of the PhiSpiral256 leaf-location codec per
.claude/plans/PhiSpiral256-LeafPlanetarium-integration-plan.md — the
orthogonal-location lane that recovers what PolarQuant (magnitude) discards.
- SpiralChart::{Euclidean, Poincare{rho_max}} — equal-Euclidean-area
(r=sqrt(u)) vs equal-hyperbolic-area (r=tanh(rho/2), arcosh-spaced).
- PhiSpiralCenterQ15 — Q15 i16/i16/u16 fixed-point centers (the precise
location tier; 256-anchor table is 1536 B).
- PhiSpiral256::{new, center_xy, nearest, distance, k_nearest} — golden
angle theta = 2*pi*frac(k/phi), nearest-anchor scalar scan, on-demand
distance/neighbor (no stored 128 KB table).
- PhiSpiralLeafAtom16 — packed (spiral_id, mag4, BGZ17 offset/stride
family indices). BGZ17 = Base17, offset family in ~17..27, stride {2,4};
families are indices, not values.
Grounding established this session by reading the real code:
- golden-angle primitive already ships (surround_metadata::GOLDEN_ANGLE,
holo Fibonacci carriers) — reused the constant, new sibling module.
- pseudo-Poincare is free only near the origin (tanh(x)~x); the charts
diverge toward the boundary where only a true Poincare chart preserves
Mobius-equivariance. Documented as a regime, with tests for both.
- precision ladder: Base17 (coarse) -> PhiSpiral256 (byte) -> i16/i16 (full).
Module doc records the design trajectory (phase-centric, not offset/stride;
a Gaussian splat = anchor + 2D covariance reusing splat3d Spd/conic, not a
bare point; hemispheric Poincare placement; optional spatial magnitude).
This commit is the first, smallest, testable layer. 12 tests, all green.
https://claude.ai/code/session_01HbqooFZHAjaUtFEzhA1R2u1 parent f041219 commit d79505a
2 files changed
Lines changed: 536 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
0 commit comments