This is the braid-closure presentation of the torus knot, an entirely separate 2D construction from the 3D sim's rotating-curve projection. Take p parallel strands and repeat the braid word σ₁σ₂⋯σ_(p−1) a total of q times, where σᵢ swaps the strands currently in columns i and i+1, always with the left strand crossing over. Closing the braid — joining bottom position i back to top position i with an arc — produces exactly the torus link T(p,q); it is a knot (one component) iff gcd(p,q) = 1.
word = (σ₁ σ₂ ⋯ σ_(p−1))^q
crossings in this diagram = q·(p−1) (every generator is one crossing)
writhe = ± q·(p−1) (all crossings share one sign — a "positive braid")
components = number of cycles of the closure permutation = gcd(p,q)
The genuinely useful subtlety: this specific diagram is only crossing-minimal when p ≤ q. Murasugi's theorem gives the true topological minimum as min(p(q−1), q(p−1)) — for p > q that minimum is achieved by the other braid presentation, with q strands repeated p times instead. Since T(p,q) = T(q,p) as knots, swapping the sliders draws the identical knot with a different crossing count — proof that crossing count (like writhe) is a property of the diagram you chose to draw, not of the knot itself. Only quantities like the Murasugi minimum or the Alexander polynomial Δ_T(p,q)(t) = (t^pq−1)(t−1) / [(t^p−1)(t^q−1)] are true invariants.
- p, q sliders — strand count and word-repeat count; gcd(p,q) sets the number of link components.
- Mirror toggle — replaces every crossing with its opposite handedness (a negative braid): writhe flips sign exactly, while the unsigned crossing count and component count never change — writhe is chirality-sensitive, crossing number is not.
- Swap p↔q — redraws the same knot type via the other strand/repeat assignment, so you can watch the crossing count jump between q(p−1) and p(q−1) while the topological minimum (and the knot itself) stays fixed.