SimplexViz is an open-source TypeScript visualization engine that maps tagged items, vector embeddings, or pairwise similarity matrices onto an adaptive 60° equilateral triangle lattice. Using perceptual OKLab color mixing, a deterministic 0.0 px overlap solver, and conformal 1:4 hierarchical drill-down, it replaces cluttered hairballs with legible interactive topic maps.
| Dimension | Force-Directed & UMAP/t-SNE Layouts | SimplexViz (60° Triangulation) |
|---|---|---|
| Spatial Structure | Unconstrained continuous coordinates | Adaptive 60° equilateral triangle lattice |
| Multi-Topic Bridges | Crossing edges or overlapping blobs | Barycentric interior coordinates inside covering simplices |
| Color Encoding | Discrete palettes or muddy sRGB blends | Perceptual OKLab contrast & barycentric hue mixing |
| Overlap Guarantee | Frequent label and node collisions | Deterministic 0.0 px overlap via SAT & PBD relaxation |
| Deep Exploration | Flat camera pan and zoom only | Continuous camera plus conformal 1:4 hierarchical drill-down |
Why Do Force-Directed Hairballs and Scatter Projections Break Down?
Traditional force-directed node-link graphs and raw UMAP or t-SNE scatter plots fail on multi-topic collections because crossing edges, conflicting attraction forces, and overlapping markers obscure structure. Empirical readability studies confirm node-link diagrams degrade above twenty vertices [GFC04], while dense overlapping contours quickly turn visual fields opaque [CPC09].
When an item belongs to three or four themes at once, classical spring layouts pull it across the canvas in competing directions. The resulting center mass hides which topics actually bridge one another and forces readers to hover blindly through stacked labels.
Dimensionality-reduction scatter plots like UMAP and t-SNE preserve local neighborhoods, yet they offer no explicit geometric anchors for macro themes and routinely stack dense clusters on top of each other. SimplexViz avoids both failure modes by anchoring balanced clusters onto the vertices of a planar 60° triangle mesh and placing multi-topic items cleanly inside the covering edges and faces.
How Does SimplexViz’s 5-Stage Pluggable Pipeline Work?
SimplexViz processes any collection through five hot-swappable strategy stages: adaptive 60° mesh construction, representation-agnostic clustering, perceptual OKLab coloring [Ott20], zero-overlap SAT and PBD layout resolution, and conformal 1:4 hierarchical drill-down. Each stage exposes a clean TypeScript interface, letting teams swap algorithms at runtime without rewriting rendering code.
At the geometry layer, SimplexMeshStrategy selects the most area-efficient 60° lattice orientation for the available viewport. Next, SimplexClusteringStrategy partitions tagged items, single- or multi-modal vector embeddings, or custom pairwise similarity matrices into balanced clusters, embedding their centroids onto mesh vertices via quadratic assignment.
Once cluster anchors are fixed, SimplexColorStrategy assigns high-contrast vertex hues in the perceptual OKLab color space [Ott20] and blends bridge items smoothly by their barycentric weights. SimplexLayoutStrategy then pairs a seeder, position-based dynamics (PBD) dispersion, and Separating Axis Theorem (SAT) hull checks to guarantee 0.0 px overlap inside every triangle. Finally, SimplexZoomStrategy switches seamlessly between free-camera pan/zoom and conformal 1:4 sub-triangle drill-down with breadcrumb navigation:
- Adaptive Mesh (
SimplexMeshStrategy): Selects the highest-area 60° equilateral lattice orientation for the host viewport. - Topic Clustering (
SimplexClusteringStrategy): Partitions items, embeddings, or similarity matrices onto balanced vertex anchors. - Perceptual Coloring (
SimplexColorStrategy): Assigns high-contrast OKLab vertex hues and blends multi-tag bridge colors smoothly. - Zero-Overlap Solver (
SimplexLayoutStrategy): Applies PBD dispersion and SAT hull separation to guarantee0.0 pxcard collisions. - Conformal Zoom (
SimplexZoomStrategy): Transitions seamlessly between free camera panning and1:4hierarchical triangle drill-down.
Each strategy contract accepts plain TypeScript data structures so teams can replace individual stages without altering the SVG renderer.
Three-Package TypeScript Architecture and Zero-Config Quickstart
SimplexViz separates pure geometric math from DOM rendering across three TypeScript packages: zero-dependency @simplex-viz/core, framework-agnostic @simplex-viz/svg, and declarative @simplex-viz/react. Each layer re-exports the helpers beneath it, so developers install only one package and render an interactive, overlap-free map with zero configuration.
Because @simplex-viz/core has zero DOM, SVG, or React dependencies, the exact same layout solver runs identically in browser workers, Node.js servers, or static site generators across three layered packages:
@simplex-viz/core: Headless geometry, clustering, OKLab mixing, and PBD/SAT solver running identically in Node.js or Web Workers.@simplex-viz/svg: Framework-agnostic DOM reconciliation controller (createSimplexSvg) with animated spring transitions.@simplex-viz/react: Declarative React wrapper (<SimplexTopicGraph />) with zero-config presets and tooltips.
Framework-agnostic applications mount directly with createSimplexSvg from @simplex-viz/svg, while React applications drop in <SimplexTopicGraph /> from @simplex-viz/react:
import { SimplexTopicGraph } from '@simplex-viz/react';
const items = [
{ id: '1', label: 'Simplex Mesh', tags: ['geometry', 'triangulation'] },
{ id: '2', label: 'OKLab Mixing', tags: ['color', 'geometry'] },
{ id: '3', label: 'SAT Solver', tags: ['collision', 'geometry'] },
];
export function TopicMap() {
return <SimplexTopicGraph items={items} preset="glyphs" tooltip />;
}For static SVG export or server-side precomputation without a browser DOM, @simplex-viz/core also exposes solveSimplexSnapshot(items, { width, height }) to return solved coordinates, OKLab colors, and verified zero-overlap metrics synchronously.
Live Demo, GitHub Repository, and On-Site Integration
You can test SimplexViz immediately in the interactive Live Demo, inspect the full MIT-licensed TypeScript source code in the GitHub repository, or see how the engine powers our own knowledge portfolio on the SimplexViz Visualization and SimplexViz Project pages.
In the standalone workbench, visitors can toggle presets (geometric, glyphs, badges), hot-swap all five pipeline stages in real time, and drill down 1:4 into individual topic triangles with 0 overlaps at 60 fps. Upcoming deep-dive articles will unpack the barycentric embedding math, the composable SAT/PBD layout solver, and the conformal 1:4 hierarchical zoom mechanics in detail.
References
- [Ott20]Björn Ottosson (2020). A perceptual color space for image processing. bottosson.github.io. Available online at https://bottosson.github.io/posts/oklab/.
- [GFC04]Mohammad Ghoniem, Jean-Daniel Fekete and Philippe Castagliola (2004). A Comparison of the Readability of Graphs Using Node-Link and Matrix-Based Representations. In IEEE Symposium on Information Visualization (InfoVis 2004). DOI: 10.1109/INFVIS.2004.1.
- [CPC09]Christopher Collins, Gerald Penn and Sheelagh Carpendale (2009). Bubble Sets: Revealing Set Relations with Isocontours over Existing Visualizations. IEEE Transactions on Visualization and Computer Graphics, 15(6), pp. 1009--1016. DOI: 10.1109/TVCG.2009.122.