
A)
void setup() {
size(200,200);
smooth();
}
void draw() {
background(255);
stroke(0);
fill(175);
ellipse(50,50,50,50);
ellipse(150,50,50,50);
ellipse(50,150,50,50);
ellipse(150,150,50,50);
}
B)
void setup() {
size(200,200);
smooth();
}
void draw() {
background(255);
stroke(0);
line(100,0,100,100);
line(100,100,0,200);
line(100,100,200,200);
}
C)
void setup() {
size(200,200);
smooth();
}
void draw() {
background(255);
stroke(0);
rectMode(CENTER);
fill(175);
rect(100,100,175,175);
fill(255);
ellipse(100,100,75,75);
}
Example Step 3 Answer:
float centerX = 100;
float centerY = 100;
void setup() {
size(200,200);
smooth();
}
void draw() {
background(255);
stroke(0);
line(width/2,0,centerX,centerY);
line(centerX,centerY,0,height);
line(centerX,centerY,width,height);
centerX += random(-1,1);
centerY += random(-1,1);
centerX = constrain(centerX,0,width);
centerY = constrain(centerY,0,height);
}








