nx_body_anchors.nx
buildroot/runtime/nx_body_anchors.nx
about
nx_body_anchors.nx -- per-body anchor-feature data (Olympus Mons,
Hellas Basin, Caloris Basin, Maxwell Montes, Mt Everest, etc.).
The "Olympus Mons pops out" data layer. Composes:
- nx_solar_system_catalog (body ids, body kinds)
- nx_anchor_feature (shape functions for DOME/BASIN/RIDGE)
Reads per-body anchor lists and sums their height contributions at
any (px, py) query point. Consumed by per-body surface generators
(nx_terrestrial_surface in nishi-engine/nx) which add the anchor
sum to base FBM noise to produce signature landmarks.
V1 ships anchors for the 4 terrestrial planets only. Future
slices extend to moons (Tycho crater on Luna; Pavonis on Mars
already in Mars list; Mons Huygens on Luna), dwarf planets, etc.
Coordinate convention: world coords in arbitrary Q14 units. V1
uses "flat-projected metres at body-scale" -- a body's surface is
modelled as a 2D plane in Q14 metres. V2 will project from
(latitude, longitude) onto the sphere using nx_camera_q14 sin/cos.
Anchor record layout (6 i64 per anchor; matches nx_anchor_feature
dispatch signature):
out[0] = kind (NX_ANCHOR_*)
out[1] = cx_q14 (world x of feature centre)
out[2] = cy_q14
out[3] = scale_q14 (characteristic radius / length)
out[4] = magnitude_q14_m (peak height or depression depth)
out[5] = orient (NX_ANCHOR_ORIENT_*; ignored for radial kinds)
Real-world reference values from NASA JPL / USGS / Wikipedia
planetary topography. Per cardinal feedback-no-third-party-trust:
numbers absorbed from public-domain scientific data (NASA / USGS
are US federal civil-service work, TIER_0_UNENCUMBERED).
genealogy_id: nasa_mars_global_surveyor_topography +
nasa_messenger_mercury_topography +
magellan_venus_radar_topography +
usgs_earth_dem_canon
lineage_id: nx_body_anchors_flat_q14_v1
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_tier.nxnx_solar_system_catalog.nxnx_anchor_feature.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 56 | const NX_MAGIC_5000: i64 = 5000 |
| 57 | const NX_MAGIC_1550: i64 = 1550 |
| 58 | const NX_MAGIC_4000: i64 = 4000 |
| 59 | const NX_MAGIC_3000: i64 = 3000 |
| 60 | const NX_MAGIC_11000: i64 = 11000 |
| 61 | const NX_MAGIC_2500: i64 = 2500 |
| 62 | const NX_MAGIC_3500: i64 = 3500 |
| 63 | const NX_MAGIC_8849: i64 = 8849 |
| 64 | const NX_MAGIC_2400: i64 = 2400 |
| 65 | const NX_MAGIC_6000: i64 = 6000 |
| 66 | const NX_MAGIC_1800: i64 = 1800 |
| 67 | const NX_MAGIC_22000: i64 = 22000 |
| 68 | const NX_MAGIC_4500: i64 = 4500 |
| 69 | const NX_MAGIC_1500: i64 = 1500 |
| 70 | const NX_MAGIC_1150: i64 = 1150 |
| 71 | const NX_MAGIC_7000: i64 = 7000 |
| 72 | const NX_MAGIC_20000: i64 = 20000 |
| 73 | const NX_MAGIC_16000: i64 = 16000 |
| 76 | const NX_BA_Q: nx_int = 16384 |
| 79 | const NX_BA_STRIDE: nx_int = 6 |
| 82 | const NX_BA_OFF_KIND: nx_int = 0 |
| 83 | const NX_BA_OFF_CX: nx_int = 1 |
| 84 | const NX_BA_OFF_CY: nx_int = 2 |
| 85 | const NX_BA_OFF_SCALE: nx_int = 3 |
| 86 | const NX_BA_OFF_MAGNITUDE: nx_int = 4 |
| 87 | const NX_BA_OFF_ORIENT: nx_int = 5 |
functions
| 92 | func nx_body_anchor_count(body_id: nx_int) -> nx_int |
| 104 | func nx_body_anchor_at(body_id: nx_int, n: nx_int, out: *i64) |
| 197 | func nx_body_anchor_sum_contribution( called by 1: main calls 4: nx_body_anchor_countsys_mmapnx_body_anchor_atnx_anchor_feature_contribution |
| 227 | func main() -> i64 |