Processing: Loop (Selin)

screen-shot-2017-02-16-at-11-48-02-pm screen-shot-2017-02-16-at-11-48-03-pm screen-shot-2017-02-16-at-11-48-03-pm-1

//Introducing a int variables
int x;

void setup(){
size(800, 800);
x = -800;
}

void draw(){
background(767);
fill(255, 0, 0, 191);

ellipse(x,145, 405, 200);
x = x + 1;
ellipse(x, 145, 405, 175);
x = x + 1;
ellipse(x, 145, 405, 150);
x = x + 1;
ellipse(x, 145, 405, 125);
x = x + 1;
ellipse(x, 145, 405, 100);
x = x + 1;
ellipse(x, 145, 405, 75);
x = x + 1;
ellipse(x, 145, 405, 50);
x = x + 1;
ellipse(x, 145, 405, 25);
x = x + 1;
ellipse(x, 145, 405, 0);
x = x + 1;

if(x>+1000){
x=-800;
};
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s