diff options
Diffstat (limited to 'graphics/asymptote/examples/colorpatch.asy')
-rw-r--r-- | graphics/asymptote/examples/colorpatch.asy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/asymptote/examples/colorpatch.asy b/graphics/asymptote/examples/colorpatch.asy new file mode 100644 index 0000000000..e0f6b5b427 --- /dev/null +++ b/graphics/asymptote/examples/colorpatch.asy @@ -0,0 +1,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); |