PShape q3bx,q4bx,q5bx,q6bx,q7bx,q8bx,q9bx,q10bx;
float circleRad = 100;
void setup() {
size(displayWidth,displayHeight, P3D);
dbx();
}
void dbx() {
q3bx = createShape();
q3bx.beginShape(POLYGON);
q3bx.fill(201,165,255);
for (int i = 0; i <3; i++) {
float angle = TWO_PI * i /3;
float x = circleRad * sin(angle)-400;
float y = circleRad * cos(angle)-900;
float z = 0;
q3bx.vertex(x, y, z);
}
q3bx.endShape(CLOSE);
q4bx = createShape();
q4bx.beginShape(POLYGON);
q4bx.fill(201,165,255);
for (int i = 0; i <4; i++) {
float angle = TWO_PI * i /4;
float x = circleRad * sin(angle)-200;
float y = circleRad * cos(angle)-900;
float z = 0;
q4bx.vertex(x, y, z);
}
q4bx.endShape(CLOSE);
q5bx = createShape();
q5bx.beginShape(POLYGON);
q5bx.fill(201,165,255);
for (int i = 0; i <5; i++) {
float angle = TWO_PI * i /5;
float x = circleRad * sin(angle);
float y = circleRad * cos(angle)-900;
float z = 0;
q5bx.vertex(x, y, z);
}
q5bx.endShape(CLOSE);
q6bx = createShape();
q6bx.beginShape(POLYGON);
q6bx.fill(201,165,255);
for (int i = 0; i <6; i++) {
float angle = TWO_PI * i /6;
float x = circleRad * sin(angle)+200;
float y = circleRad * cos(angle)-900;
float z = 0;
q6bx.vertex(x, y, z);
}
q6bx.endShape(CLOSE);
q7bx = createShape();
q7bx.beginShape(POLYGON);
q7bx.fill(201,165,255);
for (int i = 0; i <7; i++) {
float angle = TWO_PI * i /7;
float x = circleRad * sin(angle)+400;
float y = circleRad * cos(angle)-900;
float z = 0;
q7bx.vertex(x, y, z);
}
q7bx.endShape(CLOSE);
q8bx = createShape();
q8bx.beginShape(POLYGON);
q8bx.fill(201,165,255);
for (int i = 0; i <8; i++) {
float angle = TWO_PI * i /8;
float x = circleRad * sin(angle)-400;
float y = circleRad * cos(angle)-600;
float z = 0;
q8bx.vertex(x, y, z);
}
q8bx.endShape(CLOSE);
float circleRad = 100;
void setup() {
size(displayWidth,displayHeight, P3D);
dbx();
}
void dbx() {
q3bx = createShape();
q3bx.beginShape(POLYGON);
q3bx.fill(201,165,255);
for (int i = 0; i <3; i++) {
float angle = TWO_PI * i /3;
float x = circleRad * sin(angle)-400;
float y = circleRad * cos(angle)-900;
float z = 0;
q3bx.vertex(x, y, z);
}
q3bx.endShape(CLOSE);
q4bx = createShape();
q4bx.beginShape(POLYGON);
q4bx.fill(201,165,255);
for (int i = 0; i <4; i++) {
float angle = TWO_PI * i /4;
float x = circleRad * sin(angle)-200;
float y = circleRad * cos(angle)-900;
float z = 0;
q4bx.vertex(x, y, z);
}
q4bx.endShape(CLOSE);
q5bx = createShape();
q5bx.beginShape(POLYGON);
q5bx.fill(201,165,255);
for (int i = 0; i <5; i++) {
float angle = TWO_PI * i /5;
float x = circleRad * sin(angle);
float y = circleRad * cos(angle)-900;
float z = 0;
q5bx.vertex(x, y, z);
}
q5bx.endShape(CLOSE);
q6bx = createShape();
q6bx.beginShape(POLYGON);
q6bx.fill(201,165,255);
for (int i = 0; i <6; i++) {
float angle = TWO_PI * i /6;
float x = circleRad * sin(angle)+200;
float y = circleRad * cos(angle)-900;
float z = 0;
q6bx.vertex(x, y, z);
}
q6bx.endShape(CLOSE);
q7bx = createShape();
q7bx.beginShape(POLYGON);
q7bx.fill(201,165,255);
for (int i = 0; i <7; i++) {
float angle = TWO_PI * i /7;
float x = circleRad * sin(angle)+400;
float y = circleRad * cos(angle)-900;
float z = 0;
q7bx.vertex(x, y, z);
}
q7bx.endShape(CLOSE);
q8bx = createShape();
q8bx.beginShape(POLYGON);
q8bx.fill(201,165,255);
for (int i = 0; i <8; i++) {
float angle = TWO_PI * i /8;
float x = circleRad * sin(angle)-400;
float y = circleRad * cos(angle)-600;
float z = 0;
q8bx.vertex(x, y, z);
}
q8bx.endShape(CLOSE);