summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/bars3.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/bars3.asy')
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/bars3.asy22
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/bars3.asy b/Master/texmf-dist/doc/asymptote/examples/bars3.asy
new file mode 100644
index 00000000000..4205d46f37c
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/bars3.asy
@@ -0,0 +1,22 @@
+import three;
+import palette;
+import graph3;
+
+size(300);
+
+currentprojection=perspective(-30,-30,30,up=Z);
+
+surface s;
+
+for(int i = 0; i < 10; ++i) {
+ for(int j = 0; j < 10; ++j) {
+ s.append(shift(i,j,0)*scale(1,1,i+j)*unitcube);
+ }
+}
+
+s.colors(palette(s.map(zpart),Rainbow()));
+draw(s,meshpen=black+thick(),nolight,render(merge=true));
+
+xaxis3("$x$",Bounds,InTicks(endlabel=false,Label,2,2));
+yaxis3(YZ()*"$y$",Bounds,InTicks(beginlabel=false,Label,2,2));
+zaxis3(XZ()*"$z$",Bounds,InTicks);