summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/projectrevolution.asy
blob: 8bbe7f38c3d02843e3d87b90aeca53b9ec35f144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);