summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/examples/projectrevolution.asy
blob: fe639b3b901d9d632be6bcb970bc6ada80299c22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import solids; 
import palette; 
 
currentprojection=orthographic(20,0,3); 
 
size(400,300,IgnoreAspect); 
 
revolution r=revolution(new real(real x) {return sin(x)*exp(-x/2);},
			  0,2pi,operator ..,Z); 
surface s=surface(r); 
 
surface S=planeproject(shift(-Z)*unitsquare3)*s;
S.colors(palette(s.map(zpart),Rainbow()));
draw(S);
draw(s,lightgray);