# Replacing a line by a cylinder

How can I replace the line in the following graph by a tiny cylinder?

parametricPlot3D[ {CosSqrt[2]t, Sin[Sqrt[2]t](3+ Cos[t]), Sin[t]}, {t, 0, 100}]

• ParametricPlot3D[{Cos[Sqrt[2] t], Sin[Sqrt[2] t] (3 + Cos[t]), Sin[t]}, {t, 0, 100}, PlotStyle -> AbsoluteThickness@6] ? – OkkesDulgerci Jun 16 '19 at 2:48
• That doesn't work for some reason! – user21210 Jun 16 '19 at 3:06
• So instead of [t] I need something like {Cos[t],Sin[t],s}. Can I do that? – user21210 Jun 16 '19 at 3:14

You can post-process the output of ParametricPlot3D to change Lines into Tubes:

ParametricPlot3D[{Cos[Sqrt[2] t], Sin[Sqrt[2] t] (3 + Cos[t]), Sin[t]}, {t, 0, 100}] /.
Line -> (Tube[#, .05] &)


To get a hollow tube use CapForm[None] and use two different colors for inside and outside faces (say, FaceForm[Blue, Yellow]):

ParametricPlot3D[{Cos[Sqrt[2] t], Sin[Sqrt[2] t] (3 + Cos[t]), Sin[t]}, {t, 0, 12}] /.
Line ->  ({CapForm[None], FaceForm[Blue, Yellow], Tube[#, .25]} &)


• Thank you very much. Can I have this Tube open from the edge? So it looks like a cylinder (empty from inside) – user21210 Jun 16 '19 at 4:00
• Is there any solution to get a hollow cylinder ? Thanks again! – user21210 Jun 16 '19 at 4:15
• @AbdelRahman, please see the update. – kglr Jun 16 '19 at 4:37
• Thank you very much indeed! – user21210 Jun 16 '19 at 4:46
• @AbdelRahman, my pleasure. Welcome to mma.se and thank you for the accept. – kglr Jun 16 '19 at 4:58