summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/colorpatch.asy
blob: e0f6b5b4272b08e76345a6f60b463710d3142968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import three;
currentlight=Viewport;

size(10cm);

surface s=surface(patch(new triple[][] {
      {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
      {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
      {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
      {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));

s.s[0].colors=new pen[] {red,green,blue,black};
draw(s,nolight);

surface t=shift(Z)*unitplane;
t.s[0].colors=new pen[] {red,green,blue,black};

draw(t,nolight);