blob: 4e4579d98a98333857c1a0ad11e31ed054a34c34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import graph3;
import grid3;
import palette;
currentprojection=orthographic(0.8,1,1);
size(400,300,IgnoreAspect);
real f(pair z) {return cos(2*pi*z.x)*sin(2*pi*z.y);}
surface s=surface(f,(-1/2,-1/2),(1/2,1/2),50,Spline);
draw(s,mean(palette(s.map(zpart),Rainbow())),black);
grid3(XYZgrid);
|