Tube with the package tube_js
List of pictures

figure 0001

figure 0002

figure 0003

figure 0004
 Figure 0001: fig0010.asy(Compiled with Asymptote version 2.14svn-r5318)
```
/* Author: Jens Schwaiger */
settings.render=0;
import tube_js;

size(10cm,0);
currentprojection=perspective(4,3,4);
real x(real t) {return (1/sqrt(1+0.5*t^2))*cos(2pi*t);}
real y(real t) {return (1/sqrt(1+0.5*t^2))*sin(2pi*t);}
real z(real t) {return 0.9*t;}

path3 p=graph(x,y,z,0,2.7,Spline);

draw(spacetube(p,100,16), orange, 1bp+black);

```
 Figure 0002: fig0020.asy(Compiled with Asymptote version 2.14svn-r5318)
```
/* Author: Jens Schwaiger */
settings.render=0;
import tube_js;

size(10cm,0);
currentprojection=perspective(4,3,4);

guide3 p=roundedguide((1,0,0)--(0,0,0)--(0,0,1)--(0,1,1)--cycle,.4);
p=rotate(30,Y)*p;

guide cs(real s){return scale(0.15)*unitsquare;};

draw(spacetube(p,120,32,cs), lightblue, black);

```
 Figure 0003: fig0030.asy(Compiled with Asymptote version 2.14svn-r5318)
```
/* Author: Jens Schwaiger */
settings.render=0;
import tube_js;

size(10cm,0);
currentprojection=perspective(4,3,4);
currentlight=(0,0.10,1.3);

real x(real t) {return (1/sqrt(1+0.5*t^2))*cos(2pi*t);}
real y(real t) {return (1/sqrt(1+0.5*t^2))*sin(2pi*t);}
real z(real t) {return 0.9*t;}
path3 p=graph(x,y,z,1,2.7,Spline);

guide cs(real u)
{
int m=-6;
real x(real t){ return (1+1/m)*cos(t)-(1/m)*(0.7(1-u))*cos((1+m)*t);};
real y(real t){ return (1+1/m)*sin(t)-(1/m)*(0.7(1-u))*sin((1+m)*t);};
return scale(0.25)*(graph(x,y,0,2pi)..cycle);
}

draw(spacetube(p,120,24,cs,cover=true,twist=0), orange,black);

if(!is3D())

```
 Figure 0004: fig0040.asy(Compiled with Asymptote version 2.14svn-r5318)
```
// settings.render=0;
import tube_js;

size(10cm,0);
currentprojection=orthographic(0,0,1);

real x(real t) {return cos(t)+2*cos(2*t);}
real y(real t) {return sin(t)-2*sin(2*t);}
real z(real t) {return 2*sin(3t);}

path3 p=scale3(4)*graph(x,y,z,0,2*pi,Spline)--cycle;
guide arc=graph(x,y,0,2*pi)--cycle;
guide cs(real s){return arc;};

draw(spacetube(p,200,100,cs,twist=0), 0.8*blue, invisible);

if(!is3D())