See the page Knots (with METAFONT) for more details.
Click on the images for high resolution versions.
Overview:
There is a further section Drawing torus knots.
Cf. Source files (1995).
The torus knots have interpolation points
torusknot(p,q,n): (R+r cos(qt+c))*(cos(pt), sin(pt)) with t=360°k/n, k=0,…,n-1
where r<R are two radii and n is the number of points.
The interpolation is done with METAFONT's "P0..P1.. ⋯ ..Pn-1..cycle" (without "tension"). For examples see the images at the end of the page.
The constant c is now set to c=0. In 1995 it was c=30° causing rotations (disturbed for smaller n). (The setting c=30° was perhaps a leftover from experiments for (p,q)=(2,3)).
Torus knot (p,q) has (p-1)q crossings. On the path there are q groups of (p-1) consecutive over-crossings followed by (p-1) consecutive under-crossings.
The shown torus knots are
Ideally n is large approximating a smooth curve. However one may experiment with small values of n. Here are torusknot(2,5,n) for n=15,21,30:
Here are for comparison
In the second case the interpolation points do not contain the extremal "outside" points resulting in a different shape (not just a rotation).
[Click on the images for high resolution versions.]
Go to: Markus Rost's Web Page