P5JS – LA 2 – 2.1
This lesson was quite simple and short, so there are no questions or dufficulties I encountered. We played around a little with positions of circles using width and height. This is the result:
function setup() {
createCanvas(600, 240);
}
function draw() {
background(220);
text(width, 40, 40);
text(height, 40, 60);
//center ellipse//
ellipse(width/2, height/2, 60, 60);
}

function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
//1//
ellipse(width/3, height/2, 60, 60);
//2//
ellipse(2*width/3, height/2, 60, 60);
//3//
ellipse(width/3, 2*height/3, 60, 60);
//4//
ellipse(width/4, height/5, 60, 60);
}
