|
12 | 12 | //! CAM_PQ removes the meaning direction → residual ⊥ meaning |
13 | 13 | //! PolarQuant projects onto magnitude/similarity → LOSES the perpendicular location |
14 | 14 | //! PhiSpiral256 addresses that orthogonal location → recovers what PolarQuant discarded |
15 | | -//! BGZ17 golden offset/stride schedule → remembers how to recover it |
| 15 | +//! BGZ17 phase: golden/coprime cyclic step → ≈ Quintenzirkel (circle of fifths) |
16 | 16 | //! ``` |
17 | 17 | //! |
18 | 18 | //! PhiSpiral256 is **orthogonal to PolarQuant**: PolarQuant carries the |
19 | 19 | //! radial magnitude scalar and throws away angular position; PhiSpiral256 |
20 | 20 | //! carries exactly that thrown-away position. It is *not* a meaning lane |
21 | 21 | //! (that is CAM_PQ) and *not* a magnitude lane (that is PolarQuant). |
22 | 22 | //! |
23 | | -//! # Design trajectory: phase-centric splat encoding (the goal) |
| 23 | +//! # Two axes: BGZ17 phase × Poincaré clustering |
| 24 | +//! |
| 25 | +//! The golden spiral decomposes into exactly two independent axes, which |
| 26 | +//! correspond to two distinct lanes — PhiSpiral256 does not replace either, |
| 27 | +//! it *carries* both: |
| 28 | +//! |
| 29 | +//! - **Angle = BGZ17 phase.** BGZ17 *is* a phase encoding — a golden / |
| 30 | +//! coprime cyclic step akin to the **Quintenzirkel** (circle of fifths), |
| 31 | +//! where a coprime interval visits every position in a maximally-spread |
| 32 | +//! order. The golden angle `θ_k = 2π·frac(k/φ)` is the continuous limit |
| 33 | +//! of that step (the most-irrational rotation), so the spiral's **angle |
| 34 | +//! is the BGZ17 phase**. BGZ17's own coprime step is `GOLDEN_STEP = 11` |
| 35 | +//! over `BASE_DIM = 17` (verified in `hpc::bgz17_bridge`: the table |
| 36 | +//! `(i·11) mod 17` visits all 17 positions); the atom's two 2-bit `bgz` |
| 37 | +//! fields are plan-inspired placeholders, **not** those constants. |
| 38 | +//! - **Radius + spread = Poincaré clustering.** Poincaré is its own thing: |
| 39 | +//! **spatial location clustering** on the hyperbolic radial chart (see |
| 40 | +//! [`SpiralChart::Poincare`]) — a hemispheric chart around the parent |
| 41 | +//! anchor rather than a flat plane. This is the axis the cluster lives on. |
| 42 | +//! |
| 43 | +//! # Design trajectory: splat, not point (the goal) |
24 | 44 | //! |
25 | 45 | //! This module currently implements the **anchor layer**: a 256-point |
26 | 46 | //! golden-spiral codebook with nearest-anchor lookup. The intended end |
27 | | -//! state is bigger, and the anchor layer is the substrate it sits on: |
| 47 | +//! state, on the Poincaré (clustering) axis, is bigger: |
28 | 48 | //! |
29 | | -//! - **Phase-centric, not offset/stride.** BGZ17 addresses location by a |
30 | | -//! recoverable offset/stride *sampling schedule* over Base17. PhiSpiral256 |
31 | | -//! instead makes the golden-angle **phase** itself the address — the |
32 | | -//! `spiral_id` is a quantized phase on the disk, not a sample index. |
33 | | -//! - **A splat, not a point.** A leaf does not address one anchor; it |
34 | | -//! addresses a **Gaussian splat** — an anchor (phase) plus a 2D spread |
35 | | -//! (covariance) — so it encodes *spatial clustering* of the orthogonal |
36 | | -//! residual, not a single location. This is the same object the graphics |
37 | | -//! renderer already produces: the 2D conic `Σ_img` in |
38 | | -//! `hpc::splat3d::project` and the SPD covariance in `hpc::splat3d::spd3` |
39 | | -//! *are* the splat spread. PhiSpiral256's location splat reuses that math. |
40 | | -//! - **Hemispheric / Poincaré-flavored.** The placement is the |
41 | | -//! Poincaré-disk golden step (see [`SpiralChart::Poincare`]), i.e. a |
42 | | -//! hemispheric chart around the parent anchor rather than a flat plane. |
43 | | -//! - **Maybe magnitude.** The splat may also carry a weight/opacity |
44 | | -//! (spatial magnitude), making the leaf a weighted cluster rather than a |
45 | | -//! bare location. Left as a forward extension, not yet encoded. |
| 49 | +//! - **A Gaussian splat, not a point.** A leaf addresses a **cluster** — |
| 50 | +//! an anchor plus a 2D spread (covariance) — encoding *spatial location |
| 51 | +//! clustering* of the orthogonal residual, not a single location. This is |
| 52 | +//! the same object the graphics renderer already produces: the 2D conic |
| 53 | +//! `Σ_img` in `hpc::splat3d::project` and the SPD covariance in |
| 54 | +//! `hpc::splat3d::spd3` *are* the splat spread. The location splat reuses |
| 55 | +//! that math. |
| 56 | +//! - **Maybe spatial magnitude.** The splat may also carry a weight / |
| 57 | +//! opacity, making the leaf a weighted cluster. Forward extension, not |
| 58 | +//! yet encoded. |
46 | 59 | //! |
47 | 60 | //! So the trajectory is: anchor codebook (here) → splat = anchor + 2D |
48 | 61 | //! covariance (reuse `splat3d` Spd/conic) → optional magnitude. The point |
|
87 | 100 | //! |
88 | 101 | //! # Precision ladder (location) |
89 | 102 | //! |
90 | | -//! BGZ17 is the *coarse* recoverable-sampling skeleton — Base17 (17 levels), |
91 | | -//! with a golden offset family in ≈17..27 and a stride family in `{2, 4}`. |
92 | | -//! When precise location is needed, the residual is addressed at higher |
93 | | -//! resolution than Base17: |
| 103 | +//! BGZ17 is the *coarse* recoverable-sampling skeleton — Base17 with |
| 104 | +//! `BASE_DIM = 17` and `GOLDEN_STEP = 11` (verified in `hpc::bgz17_bridge`; |
| 105 | +//! the coprime golden step `(i·11) mod 17` visits all 17 positions), |
| 106 | +//! reducing a 16384-bit plane to a **lossy** `[i16; 17]` by golden-step |
| 107 | +//! octave averaging. When precise location is needed, the residual is |
| 108 | +//! addressed at higher resolution than Base17: |
94 | 109 | //! |
95 | 110 | //! ```text |
96 | 111 | //! BGZ17 / Base17 17 levels coarse recoverable sampling skeleton |
@@ -310,14 +325,18 @@ impl PhiSpiral256 { |
310 | 325 | /// ```text |
311 | 326 | /// bits 0..=7 phi_spiral_id (location address, 0..255) |
312 | 327 | /// bits 8..=11 mag4 (magnitude band, 0..15) |
313 | | -/// bits 12..=13 offset family (index into BGZ17 offsets ≈17..27, 0..3) |
314 | | -/// bits 14..=15 stride family (index into BGZ17 strides {2, 4}, 0..3) |
| 328 | +/// bits 12..=13 bgz family lo (plan-inspired 2-bit carrier, 0..3) |
| 329 | +/// bits 14..=15 bgz family hi (plan-inspired 2-bit carrier, 0..3) |
315 | 330 | /// ``` |
316 | 331 | /// |
317 | | -/// The offset/stride fields are *family indices*, not the BGZ17 values |
318 | | -/// themselves: BGZ17 operates on Base17 with a golden offset in ≈17..27 and |
319 | | -/// a stride of 2 or 4. The 2-bit index selects which family the leaf used; |
320 | | -/// the family→value table is a caller/BGZ17 concern. |
| 332 | +/// The two `bgz` fields are **plan-inspired placeholders**, not grounded |
| 333 | +/// BGZ17 parameters. The real BGZ17 (`hpc::bgz17_bridge`) is Base17 with |
| 334 | +/// `BASE_DIM = 17` and `GOLDEN_STEP = 11` (the coprime golden-step table |
| 335 | +/// `(i·11) mod 17` visits all positions — a Quintenzirkel-like phase), |
| 336 | +/// reducing a 16384-bit plane to a lossy `[i16; 17]` by golden-step octave |
| 337 | +/// averaging. These 4 bits do not encode those constants; a real BGZ17 |
| 338 | +/// binding is a follow-up, not specified here. (The earlier "offset 17..27 / |
| 339 | +/// stride 2,4" annotation was an unverified chat description — corrected.) |
321 | 340 | #[derive(Clone, Copy, PartialEq, Eq, Debug)] |
322 | 341 | #[repr(transparent)] |
323 | 342 | pub struct PhiSpiralLeafAtom16(pub u16); |
|
0 commit comments