beginner question
in
Programming Questions
•
1 year ago
hi,
I am sure there must be a simple solution to this but i don't find it :(
I have an ellipse starting at 0,0, an the radius increases all the time until it is out of the window.
what i want is that there many ellipses on the screen, e.g all two seconds, and that this process never stops.
any help appreciated
regards
rettnoise
here is what i have so far:
float r;
void setup() {
size(640, 480);
background(0);
smooth();
noFill();
strokeWeight(12);
stroke(255);
}
void draw() {
background(0);
make_ellipse();
}
void make_ellipse() {
ellipse(0, 0, r, r);
r += 2;
if (r > width*3) {
r = 0;
}
}
I am sure there must be a simple solution to this but i don't find it :(
I have an ellipse starting at 0,0, an the radius increases all the time until it is out of the window.
what i want is that there many ellipses on the screen, e.g all two seconds, and that this process never stops.
any help appreciated
regards
rettnoise
here is what i have so far:
float r;
void setup() {
size(640, 480);
background(0);
smooth();
noFill();
strokeWeight(12);
stroke(255);
}
void draw() {
background(0);
make_ellipse();
}
void make_ellipse() {
ellipse(0, 0, r, r);
r += 2;
if (r > width*3) {
r = 0;
}
}
1