[Hello! I am new to processing and this forum, srry if I’m messing up the format. I am trying to have an array of 100 random objects on my canvas but I don’t want the objects to be cut off the screen. Can someone help me with this? thx]
PShape honeycomb;
int x,y;
void setup () {
size (600,400);
background (240,248,255);
honeycomb = createShape ();
honeycomb.beginShape ();
honeycomb.fill (255,215,0);
honeycomb.stroke(255,255,0);
honeycomb.vertex (15,0);
honeycomb.vertex (30,0);
honeycomb.vertex (45,22.5);
honeycomb.vertex (30,45);
honeycomb.vertex (15,45);
honeycomb.vertex (0,22.5);
honeycomb.vertex (15,0);
honeycomb.endShape (CLOSE);
for (int i = 0; i < 80; i ++) {
shape(honeycomb,random(width),random(height));
}
}
void draw () {
}