So, I’m taking this CSS 101 class and our professor has given us some code that draws an owl:
void setup ( ) {
size(600,600);
background(200);
smooth( );
frameRate(30);
}
void draw ( ) {
owl(35,100);
}
void owl (int x, int y) {
stroke(0);
strokeWeight(70);
line(x, -35+y, x, -65+y); // body
noStroke();
fill(255);
ellipse(-17.5+x, -65+y, 35, 35); // left eye dome
ellipse( 17.5+x, -65+y, 35, 35); // right eye dome
arc(0+x, -65+y, 70, 70, 0, PI);
fill(0);
ellipse(-14+x, -65+y, 8, 8); // left eye
ellipse( 14+x, -65+y, 8, 8); // right eye
quad(0+x, -58+y, 4+x, -51+y, x, -44+y, -4+x, -51+y);
}
This creates one owl. How do I create a for() loop to create eight owls exactly next to each other? This seems like it should be some basic work but I’m honestly stumped.
And how would I create more rows under those, and how can I create those rows of owls to increase by one?
Example: Row 1 has 3 owls, row 2 has 3 owls, row 3 has 4 owls, etc.
EDIT: Forgot to add, professor wants us to clear the background before each draw()