Filling a shape with other shapes
in
Programming Questions
•
11 months ago
I would like to randomly position shapes within my larger shape.
I know how this is done with a rect/ellipse, but how would I accomplish this with something unique?
void setup() {
size(300, 300);
smooth();
}
void draw() {
myShape();
}
void myShape() {
beginShape();
vertex(25, 25);
vertex(275, 25);
vertex(275, 75);
vertex(175, 75);
vertex(175, 275);
vertex(125, 275);
vertex(125, 75);
vertex(25, 75);
endShape(CLOSE);
}
1