Nov 08 2007

Unofficial package tube_js.asy – fig0030

Figure 0003
(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())
  shipout(defaultfilename,bbox(0.2cm,black,RadialShade(white,paleblue)));

Mots-clés : ,