Hi everyone,
Should I use nested triple for loop to do it?
This is my goal:
here is my code :
int x,y,w,h;
void setup()
{
background(255);
size(500, 500);
x=250;//The center of the starting circle at the top is at position (250, 25)
y=25;
w=50;//width and height of ALL circles are 50
h=50;
}
void draw()
{
fill(0,255,0);
for(int j=0;j<=7;j++){
for(int i=0;i<=j;i++){
ellipse(x-25*i,y+j*50,w,h);
for(int k=0;k<=i;k++){
ellipse(x+25*k,y+j*50,w,h);
}
}
}
}