Difference between revisions of "Fillings"
From CodeStuff
(Created page with "<edcode> function blellow(x,y) { if (x>y) { return "blue" } else { return "yellow"; } } function greyish(x,y) { return grey(128+noise2d(x,y)*128); } set...") |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
<edcode> | <edcode> | ||
| + | |||
| + | |||
| + | |||
| + | setColour("orange"); | ||
| + | fillRectangle(100,100,100,100); | ||
| + | |||
| + | setColour("purple"); | ||
| + | fillRectangle(300,100,100,100); | ||
| + | |||
| + | |||
| + | fillRectangle(100,300,100,100,blellow); | ||
| + | |||
| + | fillRectangle(300,300,100,100,greyish); | ||
| + | |||
| + | fillRectangle(450,300,100,100,swatch); | ||
| + | |||
| + | |||
function blellow(x,y) { | function blellow(x,y) { | ||
if (x>y) { | if (x>y) { | ||
| Line 6: | Line 23: | ||
return "yellow"; | return "yellow"; | ||
} | } | ||
| + | } | ||
| + | |||
| + | function swatch(x,y) { | ||
| + | return rgb(x*255,y*255,255); | ||
} | } | ||
| Line 12: | Line 33: | ||
} | } | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</edcode> | </edcode> | ||