Line 1: | Line 1: | ||
=for Computers= | =for Computers= | ||
==Kasimir Malewitsch's bird== | |||
{| border="1" | {| border="1" | ||
|- | |- | ||
Line 6: | Line 6: | ||
! style="width: 50%" | Algorithm | ! style="width: 50%" | Algorithm | ||
|- | |- | ||
|[[File:Kasimirbird.png|400px]] | |||
|<source lang=java> | |||
void setup() { | |||
size(400,600); | |||
} | |||
void draw(){ | |||
background (255); | |||
//black square | |||
noStroke(); | |||
fill(0,0,0); | |||
rect(100,50,200,200); | |||
//body red | |||
noStroke(); | |||
fill(255, 25, 64); | |||
rect(110,220,250,200); | |||
//feathers | |||
noStroke(); | |||
fill(102,230,255); | |||
triangle(136,282,151,282,140,295); | |||
//feathers | |||
noStroke(); | |||
fill(102,230,255); | |||
triangle(180,310,220,310,200,300); | |||
//feathers | |||
noStroke(); | |||
fill(102,230,255); | |||
triangle(200,340,3400,340,300,300); | |||
//feathers | |||
noStroke(); | |||
fill(102,230,255); | |||
triangle(270,390,300,390,250,370); | |||
//yellow rectangle | |||
noStroke(); | |||
fill(255,204,102); | |||
rect(40,50,80,150); | |||
//brown Square | |||
noStroke(); | |||
fill(66,20,12); | |||
rect(120,200,50,50); | |||
//green circle | |||
stroke(77,255,106); | |||
strokeWeight(10); | |||
noFill(); | |||
ellipse(195,50,50,50); | |||
//spout details | |||
strokeCap(SQUARE); | |||
stroke(255,51,187); | |||
strokeWeight(10); | |||
line(59,79,59,160); | |||
stroke(255,51,153); | |||
strokeWeight(10); | |||
line(85,100,85,140); | |||
stroke(255,153,255); | |||
strokeWeight(10); | |||
line(95,150,95,160); | |||
//legs | |||
stroke(255,255,0); | |||
strokeWeight(10); | |||
line(215,420,215,520); | |||
stroke(255,255,0); | |||
strokeWeight(10); | |||
line(235,420,235,520); | |||
text( "x: " + mouseX + " y: " + mouseY, mouseX, mouseY ); | |||
} | |||
</source> | </source> | ||
|- | |- | ||
|} | |} |