summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/colorpatch.asy
blob: fccb03f8c6bec73f4049e58bd5f31a37d70c5bd3 (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);