Expand description
Force-Directed Edge Bundling (FDEB) — the answer to the hairball curse (#2).
Straight edges in a dense directed graph smear into an unreadable hairball. FDEB (Holten & van Wijk, 2009) turns each edge into a flexible wire subdivided into control points, then lets compatible edges — ones travelling the same way, at a similar scale and close together — attract each other’s control points. Edges going the same direction collapse into shared “information highways” that split again near their endpoints, so the eye follows trunks instead of spaghetti.
§Reused force pipeline
The bundling force is the same boids/n-body shape as
[facett_core::render::gpu::particles] and crate::gpu_layout: a per-point
electrostatic attraction toward the matching control points of compatible
edges (cohesion) balanced by a spring holding each wire’s own points evenly
spaced (the rubberband). It is a pure, deterministic function of the input
positions + params (FC-7): fixed iteration order, no RNG.
§What lands here vs the roadmap
This is the CPU reference FDEB: compatibility (angle · scale · position) is
precomputed once, then a fixed-subdivision force loop bundles the wires. The
cycle-refinement schedule (double the subdivisions each cycle) and the GPU
port (the control points are particles; compatibility is the neighbour kernel —
it drops straight onto the particles.wgsl storage-ping-pong) are documented in
.nornir/elite-graph-engine.md. The output is bundled polylines a host paints as
glowing splines.
Structs§
- Bundle
Params - FDEB tuning.
Defaultbundles moderately on a unit-ish coordinate scale. - Bundled
Edge - One bundled edge: its endpoints + the subdivided control polyline (endpoints
included, so
path.len() == subdivisions + 2). Feedpathto a spline painter.
Functions§
- bundle
- Bundle the
edges(index pairs intonodes) with FDEB. Returns oneBundledEdgeper input edge whosepathis the bundled control polyline. Deterministic in(nodes, edges, p). Self-loops / out-of-range edges become a straight degenerate path (left unbundled). - occupancy
- Occlusion / ink-coverage metric: how many distinct cells of a
cell-sized grid the edge polylines touch (sampled densely along each path). Bundling concentrates edges onto shared trunks → fewer distinct cells → less occlusion. Read as DATA: a drop vs the straight baseline proves the bundle de-hairballs the view. - straight
- The straight-edge baseline polylines (same subdivision count, no bundling) — the control comparison for the occlusion metric.
- total_
length - Total polyline length over all edges (bundling bows wires, so this is a secondary
diagnostic — the primary win is the
occupancydrop).
Type Aliases§
- P2
- A 2D point.