Recitation 6: Processing Animation-Ruben Mayorga

The project consisted in the making of a ring that expanded and contracted, with different colors. The project helped me understand the way in which processing worked and how to make limitation in the growth and contraction of objects.  The process of creating the image was complex, first of all I had to describe the square in which the image was going to be set, after that I programmed the ring and gave it a random color, setting borders/.

int d=200;
int i =1;
void setup() {
size(600, 600);

smooth();

ellipseMode(CENTER);
}
void draw() {
background(255);

stroke(random(0, 255), random(0, 255), random(0, 255));

strokeWeight(30);

ellipseMode(CENTER); // Set ellipseMode to CENTER

ellipse(300, 300, d, d);

d=d+i;
if (d>600) {
i=-1;

} else if( d <200 ) {
i=1;
}
println(d);
}

Leave a Reply