The three-leaf knot mentioned in the previous section is completely different from three to infinite. This section describes the n-leaf knot.
Let's look at the formula for the three-leaf knot again:
X = sin (t) + 2 * sin (2 * t)
Y = cos (t)-2 * Cos (2 * t)
Change it:
X = sin (t) + 2 * sin (n-1) * t)
Y = cos (t)-2 * Cos (n-1) * t)
It becomes n leaves, so simple.
N leaf Knot:
Vertices = 12000 t = from 0 to (20 * PI) n = rand_int2 (2, 24) x = sin (t) + 2 * sin (N * t-t) y = cos (t)-2 * Cos (N * t-t) z =-sin (N * t) r = 5; X = x * ry = y * rz = z * R
Another method:
Vertices = 12000 t = from 0 to (20 * PI) n = rand_int2 (2, 24) x = (2 + cos (N * t )) * Cos (n-1) * t) y = (2 + cos (N * t) * sin (n-1) * t) z = sin (N * t) r = 5x = x * ry = y * rz = z * R
Four-leaf knot
# Http://www.mathcurve.com/courbes3d/noeuds/noeuddetrefle.shtmlvertices = 1000 t = from 0 to (2 * PI) r = 10; X = r * (COS (t) + 2 * Cos (3 * t )) z = r * (sin (t)-2 * sin (3 * t) y = r * sin (4 * t)