Line 90: | Line 90: | ||
==Cat Eyes== | ==Cat Eyes== | ||
{| border="1" | |||
|- | |||
! style="width: 50%" | Result | |||
! style="width: 50%" | Algorithm | |||
|- | |||
|[[:File:katzenaugen (Konvertiert)-mac.mp4]] | |||
|<source lang=java> | |||
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); | |||
} | |||
} | |||
} | |||
</source> | |||
|- | |||
|} |
Revision as of 19:43, 19 March 2019
for Computers
Kasimir Malewitsch's bird
Cat Eyes
Result | Algorithm |
---|---|
File:katzenaugen (Konvertiert)-mac.mp4 | 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);
}
}
} |