28 oct. 2007

Asymptote using tube.asy – fig0110

Figure 0011
(Compiled with Asymptote version 2.14svn-r5318)
    
import tube;
import graph3;
size(12cm,0);
currentprojection=orthographic(4,3,4);

real x(real t) {return sin(t);}
real y(real t) {return 0.5*sin(2*t);}

path g=graph(x,y,0,2pi,50,operator ..);
path3 p=path3(scale(5)*g);

pen pen(real t){
  return interp(red,blue,1-2*abs(t-0.5));
}

draw(tube(p,coloredpath(subpath(unitcircle,1,3),pen)));
draw(p);

  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Twitter
  • Yahoo! Bookmarks

Mots-clefs :