Blue Circles

First Code Sketches in Processing

I’ve just been stepping into tinkering around with Processing, making code sketches.

Here’s the visual output:

Here’s the code. The first lines describe the area of the drawing: 600 pixels square, and the color of the background.

// sets canvas size and background
size(600, 600);
background(75, 29, 178);
smooth();

// stroke color, opacity and weight
stroke(255, 100);
strokeWeight(1);

Each fill and ellipse function describe a new shape. I’ve given “fill” 4 parameters: red, green, and blue between 0 and 255. Fourth is opacity between 0 and 255. These settings will apply to the circle described next (and any until the next “fill”). I’ve given “ellipse” 4 parameters: x and y coordinates, then width and height.

fill(75, 10, 255, 255);
ellipse(300, 300, 170, 170);

fill(55, 0, 255, 55);
ellipse(150, 150, 300, 300);

fill(55, 0, 255, 75);
ellipse(449, 150, 300, 300);

fill(55, 0, 255, 100);
ellipse(449, 449, 300, 300);

fill(55, 0, 255, 155);
ellipse(150, 449, 300, 300);

fill(55, 0, 255, 175);
ellipse(300, 300, 300, 300);