summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/twoSpheres.asy
blob: c043ae37315d5d949fecb1a0d322c2dfc8d4ac5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import three;
import palette;

size(20cm);

currentprojection=orthographic(1,1,1);

draw(box((-2,-2,-1),(2,2,1)));

draw(shift(-Z)*surface(box((-2,-2),(2,2))),blue);
draw(shift(Z)*surface(box((-2,-2),(2,2))),orange+opacity(0.5));

surface s=unitsphere;
s.colors(palette(s.map(zpart),Gradient(green+opacity(0.6),white,
                                       green+opacity(0.6))));
draw(shift(0.5X+0.5Y)*s);
draw(shift(-0.5X-0.5Y)*s);