zigzag-engine/fixtures/half_braid_geometry.json
Maximus Gorog c011af0414 Add visibility filter and output only visible elements
Added Point::is_visible() to explosion.rs:
- A point at geom_dim d is visible iff coords[d..] are all singular
- Matches homotopy.io's visibility filter (mesh.rs:111-115)

Updated render_braiding.rs:
- Filter to visible elements only (7 of 23 points for half_braid)
- Compute layout coordinates: x=time, y=height, z=depth
- Wires spread at z = [-1, 0, 1], vertices at z = [-0.5, 0.5]
- No volumes in output (not rendered)

Visible elements for half_braid:
- 2 vertices: (s0,s0,s0), (s1,s0,s0)
- 3 wires: (r0,s0,s0), (r1,s0,s0), (r2,s0,s0)
- 2 surfaces: (r0,r0,s0), (r0,r1,s0)

Updated web/zigzag-renderer.jsx with new geometry data.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-08 02:16:36 -06:00

139 lines
No EOL
1.9 KiB
JSON

{
"metadata": {
"source": "half_braid.json",
"dimension": 3,
"total_points": 23,
"visible_points": 12,
"total_covers": 35
},
"vertices": [
{
"id": 21,
"label": "vertex_0",
"point": "s0,s0,s0",
"coords": [
0.0,
0.0,
-0.5
]
},
{
"id": 22,
"label": "vertex_1",
"point": "s1,s0,s0",
"coords": [
0.0,
0.0,
0.5
]
}
],
"wires": [
{
"id": 18,
"label": "wire_0",
"point": "r0,s0,s0",
"coords": [
0.0,
0.0,
-1.0
],
"endpoints": [
21,
22
],
"endpoint_coords": [
[
0.0,
0.0,
-0.5
],
[
0.0,
0.0,
0.5
]
]
},
{
"id": 19,
"label": "wire_1",
"point": "r1,s0,s0",
"coords": [
0.0,
0.0,
0.0
],
"endpoints": [
21,
22
],
"endpoint_coords": [
[
0.0,
0.0,
-0.5
],
[
0.0,
0.0,
0.5
]
]
},
{
"id": 20,
"label": "wire_2",
"point": "r2,s0,s0",
"coords": [
0.0,
0.0,
1.0
],
"endpoints": [
21,
22
],
"endpoint_coords": [
[
0.0,
0.0,
-0.5
],
[
0.0,
0.0,
0.5
]
]
}
],
"surfaces": [
{
"id": 16,
"label": "surface_0",
"point": "r0,r0,s0",
"coords": [
0.0,
-1.0,
-1.0
],
"boundary_wires": [
18
]
},
{
"id": 17,
"label": "surface_1",
"point": "r0,r1,s0",
"coords": [
0.0,
0.0,
-1.0
],
"boundary_wires": [
18
]
}
]
}