summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/elevation.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/elevation.asy')
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/elevation.asy17
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/elevation.asy b/Master/texmf-dist/doc/asymptote/examples/elevation.asy
new file mode 100644
index 00000000000..1ff4ee38f28
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/elevation.asy
@@ -0,0 +1,17 @@
+import graph3;
+import grid3;
+import palette;
+
+currentprojection=orthographic(0.8,1,1);
+
+size(400,300,IgnoreAspect);
+
+defaultrender.merge=true;
+
+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);