Line 1: | Line 1: | ||
=for Computers= | =for Computers= | ||
==Kasimir Malewitsch's bird== | ==I: Kasimir Malewitsch's bird== | ||
{| border="1" | {| border="1" | ||
|- | |- | ||
Line 89: | Line 89: | ||
|} | |} | ||
==Cute Bauhaus== | ==II: Cute Bauhaus== | ||
{| border="1" | {| border="1" | ||
|- | |- | ||
Line 149: | Line 149: | ||
|} | |} | ||
==Cat Eyes== | ==III: Cat Eyes== | ||
{| border="1" | {| border="1" | ||
|- | |- | ||
Line 185: | Line 185: | ||
|- | |- | ||
|} | |} | ||
==IV: Butterflies== |
Revision as of 20:24, 22 March 2019
for Computers
I: Kasimir Malewitsch's bird
II: Cute Bauhaus
Result | Algorithm |
---|---|
void setup() {
size(500,500);
frameRate(60);
}
void draw() {
background (255);
line(20,30,70,80);
line(0,0,100,100);
size(500, 500);
background(300, 200, 100);
strokeWeight(50);
line(100, 500, 400, 80);
line(5, 400, 400, 330);
noFill();
stroke(0, 0, 200);
strokeWeight(5);
ellipse(mouseX, mouseY, 400, 300);
//here i draw a red square
noStroke();
fill(255,0,0);
rect(100,150,150,150);
//circle
fill(0);
ellipse(300,355,150,150);
//triangle
fill(255,255,0);
beginShape();
vertex(250,150);
vertex(400,150);
vertex(325,mouseY);
endShape();
rect(10, 10, 30, 30);
noFill();
strokeWeight(40);
rect(400, 300, 100, 50);
}
}
}
} |
III: Cat Eyes
Result | Algorithm |
---|---|
int gap=100;
void setup(){
size(800,600);
background(0,230,115);
smooth(8);
}
void draw(){
float speed= sin(1)*30;
frameRate(speed);
for(int i=1; i<=7; i+=1) {
for (int j=1; j<=5; j+=1){
int xPos=i*gap;
int yPos=j*gap;
float ellWidth=random(100);
float ellHeight=random(100);
float R=random(100,255);
float G=random(100,255);
float B=random(100,255);
noStroke();
fill(R,G,B);
ellipse(xPos,yPos,ellWidth,ellHeight); |