Docs Navigation (Stage 04)›

Collision-Local Pocket Layout

Keeps sparse regions at full 1.0x scale and shrinks only locally colliding pockets to 0.0 px overlap.

Key Takeaways

  • Recommended layout strategy whenever conformal 1:4 drill-down zoom is enabled.
  • Keeps sparse outer clusters at full 1.0x leaf scale and shrinks only locally colliding dense pockets.
  • Guarantees covering-triangle containment and 0.0 px convex SAT overlap.

Visual Mechanism

Dense pocket: α_local = 0.52 (drillable)Sparse neighbor: α_local = 1.00 (leaf)
Preserves full 1.00x leaf scale in sparse triangles and shrinks only locally colliding node pockets via iterative SAT separation until 0.0 px overlap is achieved.

Factory Signature

Re-exported from @simplex-viz/core, @simplex-viz/svg, and @simplex-viz/reactStage 04 Overview →
createCollisionDrivenLayoutStrategy(options?: CollisionDrivenLayoutOptions): SimplexLayoutStrategy

Options & Defaults

minLocalScaleDefault: 0.28

number

Lower bound on per-item local scale inside ultra-dense pockets.

shrinkFactorDefault: 0.85

number

Multiplicative step applied only to actively colliding node pairs per pass.

warmStartDefault: true

boolean

Reuses settled coordinates across updates for smooth transitions.

Local Pocket Shrinking + 1:4 Drill-Down Synergy

In real-world corpora, one interdisciplinary triangle may hold 25 items while neighboring triangles hold 3. Instead of shrinking the entire atlas to fit the busiest triangle, Collision-Local Pocket Layout composes createMeshInwardFanSeeder(), createSpaceFillingPbdRelaxer(), and createCollisionLocalScaleController(): sparse regions stay at crisp 1.0x scale, while dense pockets pack cleanly and automatically mark their parent triangle as isDrillable: true for 1:4 conformal zoom!

Usage Example

import {
  SimplexTopicGraph,
  createCollisionDrivenLayoutStrategy,
  createBarycentricZoomStrategy,
} from '@simplex-viz/react';

<SimplexTopicGraph
  items={items}
  layoutStrategy={createCollisionDrivenLayoutStrategy({ minLocalScale: 0.3 })}
  zoomStrategy={createBarycentricZoomStrategy()}
/>;