HomeCompanion pagesSpacelike Knots

Spacelike Knots

A knot equipped with a Minkowski metric, turning crossings into causal inversions. The distance matrix becomes a causal diagram: timelike, spacelike, and null separations color-coded across the whole knot.

Open the interactive lab Watch the video

Knot Topology Lab — Causal Crossings via Minkowski Metric

A knot equipped with a Minkowski metric, turning crossings into causal relationships. Each strand pair is classified as timelike (causally connected), spacelike (causally disconnected), or lightlike (null) — recasting the over/under choice of a crossing as a causal inversion in a relativistic embedding of the knot.

An interactive 3D knot theory visualization tool that uses TensorFlow.js for physics-based optimization and distance matrix analysis. Explore classical knot types through the lens of Euclidean and Minkowski spacetime metrics.


Why This Is Different

Standard knot visualizations focus on 3D embeddings, crossings, or projections to knot diagrams. This lab adds an axis of structure that's normally absent from knot theory: a causal metric.

By designating one spatial axis as "time" and computing pairwise Minkowski intervals $ds^2 = -c^2,dt^2 + dx^2 + dy^2$, every pair of points on the knot is classified as:

Crossings in the Euclidean picture become causal inversions in the Minkowski picture: the strand that's "above" is also the strand that's in the causal future, and tugging the knot through itself flips the causal ordering of nearby strand pairs. The distance matrix becomes a causal diagram of the knot.

This is not a known invariant; it's a fresh visualization angle that makes knot topology look like a small relativistic spacetime.


Features

Knot Types

Distance Metrics

In Minkowski mode, the distance matrix is color-coded by causal structure:

Physics Optimization

Points are optimized using two competing forces:

L = L_edge + L_repel

L_edge  = k · Σ (|pᵢ - pᵢ₊₁| - d₀)²
L_repel = r · Σᵢ≠ⱼ±₁  1 / (|pᵢ - pⱼ|² + ε)

Optimizers

Metric Optimization (Minkowski mode)

Automatically rotates the knot in 3D to extremize its causal structure:


Controls

Control Description
Start / Stop Toggle continuous optimization
Step Run a single optimization step
Reset Reinitialize the knot
Redistribute Randomly resample points along the current curve
Copy / Paste Export/import knot point data as JSON
Orbit Knot Mouse drag rotates the knot geometry itself (not just the camera)
Export STL Download a tube mesh of the current knot for 3D printing
Mouse drag Rotate camera view
Scroll wheel Zoom

Parameters

Parameter Description
Points (N) Number of points sampled along the knot curve
Control Points Number of Catmull-Rom control points (random spline only)
Target Edge Length Rest length for the edge spring constraint
Edge Stiffness Spring constant for edge length enforcement
Repulsion Strength Magnitude of non-adjacent point repulsion
Repulsion Cutoff Distance beyond which repulsion is suppressed
Learning Rate Optimizer step size
Time/Space Ratio (c) Speed-of-light parameter for Minkowski metric

Distance Matrix

The right panel shows the N×N pairwise distance matrix D[i,j] = ‖pᵢ − pⱼ‖.

In Minkowski mode, the matrix becomes a causal diagram — the colored cells show, for every pair of points on the knot, whether one could in principle send a signal to the other. Crossings show up as small islands of causal inversion.


Tech Stack


File Structure

spacelike-knots/
├── index.html              # Main application
└── js/
    ├── optimizer-adam.js   # Adam optimizer wrapper
    ├── optimizer-qqn.js    # QQN optimizer
    └── optimizer-lbfgs.js  # L-BFGS optimizer

Running Locally

No build step required. Serve the directory with any static file server:

npx serve spacelike-knots
# or
python -m http.server 8080

Then open http://localhost:8080 in a browser.