How do I set these circles up?

I’m having a hard time figuring out how to change the colors and how to set up the circles.Help a example would help

What have you tried so far? Can you draw a circle?

2 Likes

Which structure would you use to draw circles of different size again and again?

Loop circle,I just don’t know how to set it up and make it change colors

Brilliant

Which kind of loop?

See reference

Show your attempt: your entire code

That’s the thing I know it need a loop but I don’t know how to set it up to recreate the example

No, I am not doing this for you

Looking at your other posts, that has been said to you before

You need setup and draw - see reference

You need a loop - see reference under Iteration

https://processing.org/reference/

Then place the loop in setup() or so and the ellipse() command therein

Chrisir

Also see this

https://processing.org/tutorials/overview/

Sections Hello World and Hello Mouse

Show your attempt, your not working code please

Hello ImConfused
One possible Implementation which is based on random colors would be:

//set the xAxis and yAxis of your window
int windowX=500;
int windowY=500;
int radius;

//according to your excercise the Interval must be set to 20
int interval=20;

void settings(){
  size(windowX,windowY);
}

void setup(){
  background(255);
  radius=min(windowX,windowY);

  while(radius>interval){
    //create a random color with RGB values between 0 and 255
    fill(color(random(0,255),random(0,255), random(0,255)));
    
    //draw ellipse
    ellipse(width/2, height/2, radius, radius);
    
    //decrease the radius by the interval
    radius-=interval;
  }}```

Well done you have just done his school work for him :angry:

1 Like