Torus Knot Visualization

A (p,q) torus knot winds p times around the torus longitudinally and q times meridionally. Parametric: x=(R+r·cos(qθ))cos(pθ). The trefoil is (2,3), the cinquefoil is (2,5). When gcd(p,q)=1 it's a knot; otherwise a link. Drag to rotate.

Trefoil knot (2,3)