Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 97aea805d7769ff00c42a2832ddab6a9 > files > 332

asymptote-2.41-1.mga6.armv5tl.rpm

import solids; 
import palette; 
 
currentprojection=orthographic(20,0,3); 
 
size(400,300,IgnoreAspect); 
 
revolution r=revolution(graph(new triple(real x) {
      return (x,0,sin(x)*exp(-x/2));},0,2pi,operator ..),axis=Z); 
surface s=surface(r); 
 
surface S=planeproject(shift(-Z)*unitsquare3)*s;
S.colors(palette(s.map(zpart),Rainbow()));

render render=render(compression=Low,merge=true);
draw(S,render);
draw(s,lightgray,render);