I wonder how to get the trefoil knot enclosed.
Of course I can use
KnotData["Trefoil"]
but then I like to have a more colorful and thicker knot. Who can/will help?
Thanks,
Vincent Jonker (from the Freudenthal Institute, Utrecht University).
is there anybody who likes to help me, please! vincent
Maybe:
trefoil[t_] := {Sin[t] - 2 Sin[2 t], Cos[t] + 2 Cos[2 t], -Sin[3 t]}
ParametricPlot3D[trefoil[t],{t,0,2 Pi},Boxed->False,Axes->False,
ViewPoint->{0,0,50},ViewVertical->{0,-1,0},PlotRange->4,
ColorFunction->Function[{x,y,z,u},Hue@u],PlotPoints->300
]/.Line[pts_,rest___]:>Tube[pts,0.8,rest]
Or use the built-in parametrization in KnotData:
param = KnotData["Trefoil", "SpaceCurve"];
ParametricPlot3D[
(* reflect/rotate around to get like the picture *)
{1, -1, 1} RotationMatrix[{{0, 1, 0}, {0, 0, 1}}] . param[t],
{t, 0, 2 Pi},
PlotStyle -> {Tube[0.5]}, ColorFunction -> (Hue[0.92 - #3/1.4] &),
PlotPoints -> 100, Axes -> False, Boxed -> False,
PlotRangePadding -> 0.55,
ViewPoint -> {0., -4, -0.5}, ViewVertical -> {-0.05 , 0, 1},
Lighting -> {
DirectionalLight[GrayLevel[0.9], {0, 2, 3}],
DirectionalLight[GrayLevel[0.9], {2, -1, 3}],
AmbientLight[GrayLevel[0.4]]}]