summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/cheese.asy
blob: 05b9181fdf470c2fa73dec4cc35f9ccdef1a0180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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));