Basic question about drawing....
in
Programming Questions
•
3 years ago
hey boys and girls.
just starting out on this quest.
trying to get alternating expanding circles of white and black.
the white should be triggered when the black has reached the border of the frame then black triggered when white hits the border and so on.
any suggestions? do i need to build in a different way?
below is my foundation of code.
would really appreciate your help o wise ones...
int a = 0;
void setup()
{
size(200, 200);
stroke(255);
frameRate(50);
background(0);
}
void draw(){
fill(0);
a = a + 1;
ellipse(100, 100, a, a);
if(a > width)
a = 0;
}
1