The (3,5) Torus Knot

Torus knots are knots which may be drawn on the surface of a torus without intersection. Here's a function which plots the (p,q) torus knot for relatively prime p and q.


TorusKnotPlot[p_, q_, opts___] := TubePlot[
    {Cos[t] (1 + .5 Cos[(q/p) t]), 
        Sin[t] (1 + .5 Cos[(q/p) t]), .5 Sin[(q/p) t]},
    {t, 0, 2 Pi p}, .1, {0, 0, 1},
    ViewPoint -> {0, 0, 1}, Boxed -> False, Axes -> False, opts]

The (3,5) Torus Knot above was generated as follows


TorusKnotPlot[3, 5, PlotPoints -> {128, 16},
    PlotLabel -> "The (3,5) Torus Knot",
    LightSources -> {{{1., 0., 1.}, RGBColor[1, 0, 0]}, {{1., 1., 1.}, 
    RGBColor[0, 1, 0]}, {{0., 1., 1.}, RGBColor[0, 0, 1]}, {{-1., 0., -1.}, 
    RGBColor[1, 0, 0]}, {{-1., -1., -1.}, 
    RGBColor[0, 1, 0]}, {{0., -1., -1.}, RGBColor[0, 0, 1]}}]

[UNCA | Math Dept. | Mark's Home]