# Tubes!

The Mathematica code below inflates a curve to produce a tube!

(* Refactoring of Curve-to-tube recipe *)
CoreObj[t_]  = {Sin[4t], Cos[3t], Sin[5t]};
(* This defines the curve to be tubed *)
FirstD[t_] = D[CoreObj[t],t];
(* This defines the tangent vector at t *)
FirstNV[t_] = {FirstD[t][[2]] - FirstD[t][[3]], FirstD[t][[3]] - FirstD[t][[1]],FirstD[t][[1]] - FirstD[t][[2]]};
(* this defines a normal vector to the curve*)
SecondNV[t_] = FirstD[t] \[Cross] FirstNV[t];
(* this defines a mutually orthogonal vector to both the tangent and normal vector *)
NNV1[t_] = Normalize[FirstNV[t]];
NNV2[t_] = Normalize[SecondNV[t]];
(* creates unit vectors *)

1. the trefoil knot $$\{\sin(t) + 2\sin(2t), \cos(t) - 2\cos(2t), -\sin(3t)\}$$