summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/cheese.asy
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/examples/cheese.asy
Initial commit
Diffstat (limited to 'graphics/asymptote/examples/cheese.asy')
-rw-r--r--graphics/asymptote/examples/cheese.asy15
1 files changed, 15 insertions, 0 deletions
diff --git a/graphics/asymptote/examples/cheese.asy b/graphics/asymptote/examples/cheese.asy
new file mode 100644
index 0000000000..05b9181fdf
--- /dev/null
+++ b/graphics/asymptote/examples/cheese.asy
@@ -0,0 +1,15 @@
+import graph3;
+import palette;
+import contour3;
+size(400);
+
+real f(real x, real y, real z) {
+ return cos(x)*sin(y)+cos(y)*sin(z)+cos(z)*sin(x);
+}
+
+surface sf=surface(contour3(f,(-2pi,-2pi,-2pi),(2pi,2pi,2pi),12));
+sf.colors(palette(sf.map(abs),Gradient(red,yellow)));
+
+currentlight=nolight;
+
+draw(sf,render(merge=true));