Torus Knot

A knot that winds around a torus p times in one direction and q times in the other

A (p,q)-torus knot lives on the surface of a torus, wrapping p times around the central hole and q times through it. The parametric form: x = (R + r*cos(q*t))*cos(p*t), y = (R + r*cos(q*t))*sin(p*t), z = r*sin(q*t). The knot is trivial (unknot) when gcd(p,q)=1 gives just 1 component; when gcd > 1 it splits into gcd separate links. The trefoil knot is the (2,3)-torus knot — the simplest non-trivial knot.