Skip to content

feat(fma): FMA-addressed 3D anatomy — triangle rasterizer + canonical GUID + /FMA server#56

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/charming-johnson-ufstpw
Jun 24, 2026
Merged

feat(fma): FMA-addressed 3D anatomy — triangle rasterizer + canonical GUID + /FMA server#56
AdaWorldAPI merged 2 commits into
mainfrom
claude/charming-johnson-ufstpw

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 24, 2026

Copy link
Copy Markdown
Owner

fma — FMA-addressed 3D human anatomy

Real connected anatomical geometry (triangle meshes), addressed by the FMA ontology, rendered solid on the CPU and served under /FMA — the sibling of the cubus /torso route. Three things, one system: geometry ⟷ address ⟷ route.

A new standalone crate at fma/ (png + std only, isolated [workspace], not in the Quarto workspace — zero impact on existing builds).

What's in it

bin what
mesh CPU triangle rasterizer (z-buffer + Gouraud), solid renders — bones / tissues / all
turntable parallel 360° prerender, N frames (default 270 = 3 s @ 90 fps)
serve dep-free std HTTP server, all routes under /FMA (binds 0.0.0.0:$PORT)
guid v2 part_of FNV GUID per FMA node → manifest
converge v3 cascading-HHTL (part_of:is_a) canonical NodeGuidguid/guid_converged.tsv
anchor location-encoding compression study

Geometry (not splats)

Per-triangle z-buffered fill with smooth per-vertex (Gouraud) normals, two-sided shading, FMA-tissue color. Skeleton 602K triangles, full tissue body 6.2M triangles, rendered in seconds on 4 cores.

skeleton tissues
skeleton tissues

Address (canonical GUID)

Each part's distinguished name is its part_of ancestry (human body / cardiovascular system / … / aorta). The GUID cascade tiers are FNV‑1a of the cumulative ancestor prefix (siblings share leading groups → prefix‑routable); the IDENTITY tier is the golden‑stride mint (GOLDEN_RATIO × EULER_GAMMA, stride‑4/offset‑20 — the helix CurveRuler, the same generator as bgz17 / bgz-hhtl-d / helix). 0 identity collisions over 1368 nodes.

Convergence (v3) — (part_of:is_a) cascading-HHTL canonical NodeGuid

The Ada workspace already has an independent FMA effort (the other session's /fma is_a heart graph in crates/osint-bake/.../fma.rs + cockpit/.../FmaGraph.tsx, on the canonical NodeGuid). This PR's converge bin adds a third addressing that unifies both without replacing either — disjoint files, disjoint routes, lose neither version:

  • Each 8:8 HHTL tier = (part_of : is_a)high = part_of (mixin/family/basin, where; partonomy sibling-rank), low = is_a (identity/type, what; taxonomy sibling-rank) — cascading HEEL→HIP→TWIG so the high-byte chain prefix-routes the body partonomy and the low-byte chain prefix-routes the type taxonomy: both hierarchies in one key, routable on either axis at every level.
  • 16-byte layout byte-identical to lance_graph_contract::canonical_node::NodeGuid (OGAR canon, 2026-06-13: classid·HEEL·HIP·TWIG·family·identity). classid uses the same 0x0A ConceptDomain::Anatomy space as the other session's bake (0x0A01 soft tissue, 0x0A02 skeleton) — so a heart node from theirs and from this full body share classid. Dep-free emit keeps this crate standalone.
aorta subtree (v3):  classid  HEEL HIP  TWIG  family·identity
  FMA3736 ascending  00000a01-0901-0702-0e02-000105·880ff7   part_of:ascending aorta  is_a:ascending aorta
  FMA3789 abdominal  00000a01-0901-0702-0e02-000305·aea610   part_of:abdominal aorta  is_a:abdominal aorta
  ^ shared classid + HEEL/HIP/TWIG = same region AND same vessel type; tail disambiguates

The anchor study compares location encodings — Cartesian‑Skeleton hybrid wins (exact bone anchors + closer‑of‑region‑or‑bone residue), p90 56 mm vs cascade 122 / raw‑cartesian 91. (This empirically reproduces OGAR PR quarto-dev#116's Located (bones = spatial anchor) vs Cascade (soft tissue = part_of) split that the other session's bake cites.)

Routes (serve)

All under /FMA — no case-only /fma vs /FMA overlap (the lowercase /fma belongs to the other session's heart-graph view).

route serves
GET /FMA viewer: renders + tissue legend + live part lookup
GET /FMA/skeleton.png, GET /FMA/body.png solid skeleton / tissue body (PNG)
GET /FMA/guid/<id> {container, guid, distinguished_name} (JSON)
GET /FMA/manifest full GUID manifest (TSV)
GET /FMA/turntable 360° turntable, 90 fps autoplay (LazyLock‑prebuffered frames)
GET /FMA/live interactive drag‑to‑rotate over the same frames
GET /FMA/frame/<i> one turntable frame, from the RAM prebuffer

Data & attribution

Small BodyParts3D ID/relation maps are committed (fma/data/*.txt); meshes are fetched by fetch_data.sh. Geometry: BodyParts3D, © The Database Center for Life Science, CC Attribution‑Share Alike 2.1 Japan. Ontology: FMA. Code: Apache‑2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 35 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b913014b-275c-467e-9d1e-d51b0b7a07a8

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2eed9 and e0cd766.

⛔ Files ignored due to path filters (3)
  • fma/docs/frame_0067.png is excluded by !**/*.png
  • fma/docs/mesh_bones.png is excluded by !**/*.png
  • fma/docs/mesh_tissues.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • fma/.gitignore
  • fma/Cargo.toml
  • fma/README.md
  • fma/data/element_parts.txt
  • fma/data/inclusion.txt
  • fma/data/isa_element_parts.txt
  • fma/data/isa_inclusion.txt
  • fma/fetch_data.sh
  • fma/src/bin/anchor.rs
  • fma/src/bin/converge.rs
  • fma/src/bin/guid.rs
  • fma/src/bin/mesh.rs
  • fma/src/bin/serve.rs
  • fma/src/bin/turntable.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI force-pushed the claude/charming-johnson-ufstpw branch 2 times, most recently from 5adfd03 to a6d8b03 Compare June 24, 2026 13:03
claude added 2 commits June 24, 2026 13:30
… GUID + /FMA server

Real connected geometry (BodyParts3D meshes) addressed by the FMA ontology and
served under /FMA — the sibling of the cubus /torso route.

- mesh / turntable: CPU triangle rasterizer (z-buffer + Gouraud), solid renders
  plus a parallel 360 turntable prerender. Skeleton 602K tris, tissue body 6.2M.
- guid: canonical GUID per FMA node — part_of distinguished-name cascade
  (prefix-routable) + golden-stride identity mint (GOLDEN_RATIO x EULER_GAMMA,
  stride-4/offset-20; same generator as bgz17 / bgz-hhtl-d / helix). 0 collisions
  over 1368 nodes.
- anchor: location-encoding study (cascade vs raw-cartesian vs Cartesian-Skeleton
  hybrid; hybrid wins, p90 56 mm).
- serve: dep-free std HTTP, one route surface all under /FMA (no case-only
  /fma vs /FMA overlap) — /FMA viewer, /FMA/guid/<id> resolution,
  /FMA/turntable 90 fps autoplay (LazyLock prebuffer), /FMA/live interactive
  drag, /FMA/frame/<i> from the RAM prebuffer.

Standalone crate (png + std only), isolated from the Quarto workspace. Meshes
fetched via fetch_data.sh (BodyParts3D, CC-BY-SA); mapping TSVs committed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
…ergence

Adds a third FMA addressing that converges the two existing ones WITHOUT
replacing either (disjoint files, disjoint routes — lose neither version):

  v1 (other session): is_a heart graph, canonical NodeGuid, /fma
                      (crates/osint-bake/.../fma.rs, cockpit FmaGraph.tsx)
  v2 (this crate, guid.rs): full-body part_of FNV cascade + 3D mesh, /FMA
  v3 (this crate, converge.rs): each 8:8 HHTL tier = (part_of : is_a)

In v3 the two axes are the two BYTES of every HHTL tier — high = part_of
(mixin/family/basin, WHERE; partonomy sibling-rank), low = is_a (identity/type,
WHAT; taxonomy sibling-rank) — cascading HEEL->HIP->TWIG so the high-byte chain
prefix-routes the body partonomy and the low-byte chain prefix-routes the type
taxonomy. Both hierarchies in one key, routable on either axis at every level.

The 16-byte layout is byte-identical to
lance_graph_contract::canonical_node::NodeGuid (OGAR canon locked 2026-06-13:
classid·HEEL·HIP·TWIG·family·identity, LE; 3 HHT tiers + u24 family + u24
identity). classid uses the same 0x0A ConceptDomain::Anatomy space as v1's bake
(0x0A01 soft tissue, 0x0A02 skeleton), so a heart node from v1 and a heart node
from v3 share classid. Emitted dep-free (raw canonical bytes) so this crate stays
standalone and v2 keeps building unchanged.

Verified on the committed trees: 1368 nodes (841 carry the is_a axis, 369
skeletal 0x0A02), 0 identity collisions. The aorta subtree shares
classid+HEEL+HIP+TWIG (same region AND same vessel type), diverging only in the
family·identity tail; thoracic vertebrae 9-12 cluster under one 0x0A02 prefix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
@AdaWorldAPI AdaWorldAPI force-pushed the claude/charming-johnson-ufstpw branch from 37e5b23 to e0cd766 Compare June 24, 2026 13:31
@AdaWorldAPI AdaWorldAPI merged commit a972adc into main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants