72 lines
987 B
Plaintext
72 lines
987 B
Plaintext
void setup() {
|
|
size(800, 600);
|
|
}
|
|
|
|
// Animation mit Modulo
|
|
/*void draw() {
|
|
background(200);
|
|
ellipse(frameCount%width, 300, 100, 100);
|
|
}*/
|
|
|
|
// Muster 4
|
|
/*int x = 0;
|
|
int y = 0;
|
|
|
|
void draw() {
|
|
stroke(x / (width / 255));
|
|
line(x, 0, x, y);
|
|
x+= 1;
|
|
y+= 1;
|
|
}*/
|
|
|
|
// Muster 3
|
|
/*int x = 0;
|
|
int y = 0;
|
|
|
|
void setup() {
|
|
size(800, 600);
|
|
|
|
y = height;
|
|
}
|
|
|
|
void draw() {
|
|
line(x, 0, x, y);
|
|
x+= 1;
|
|
y-= 1;
|
|
}*/
|
|
|
|
// Muster 2
|
|
/*int x = 0;
|
|
int y = 0;
|
|
|
|
void draw() {
|
|
if (x % 3 == 0) {
|
|
stroke(0);
|
|
} else if (x % 3 == 1) {
|
|
stroke(150);
|
|
} else {
|
|
stroke(230);
|
|
}
|
|
|
|
line(x, 0, x, y);
|
|
x+= 1;
|
|
y+= 1;
|
|
}*/
|
|
|
|
// Muster 1
|
|
/*int x = 0;
|
|
float y = 0;
|
|
|
|
void draw() {
|
|
if (x % 3 == 0) {
|
|
stroke(0);
|
|
} else if (x % 3 == 1) {
|
|
stroke(150);
|
|
} else {
|
|
stroke(230);
|
|
}
|
|
|
|
line(x, 0, x, y);
|
|
x+= 1;
|
|
y+= 0.5;
|
|
}*/ |