Skip to content

Instantly share code, notes, and snippets.

@beesandbombs
Created Nov 5, 2018
Embed
What would you like to do?
static design
void setup() {
size(750, 750, P2D);
smooth(8);
noFill();
strokeWeight(4.5);
rectMode(CENTER);
strokeJoin(ROUND);
}
color RED = color(250, 80, 70), GREEN = color(50, 200, 140),
WHITE = color(250), BLACK = color(24, 20, 20),
YELLOW = color(240, 230, 40);
float x, d;
float t;
void draw() {
translate(width/2, height/2);
background(BLACK);
stroke(GREEN);
ellipse(0, 0, 20, 20);
stroke(RED);
ellipse(0, 0, 50, 50);
stroke(WHITE);
for (int i=0; i<24; i++) {
pushMatrix();
rotate(TWO_PI*i/24);
stroke(WHITE);
if (i%2 == 0)
line(40, 0, 70, 0);
else {
stroke(YELLOW);
line(40, 0, 45, 0);
line(55, 0, 60, 0);
}
popMatrix();
}
stroke(GREEN);
for (int i=0; i<12; i++) {
pushMatrix();
rotate((i+.5)*TWO_PI/12);
translate(88, 0);
rotate(PI/4);
rect(0, 0, 23, 23);
popMatrix();
}
stroke(RED);
for (int i=0; i<12; i++) {
pushMatrix();
rotate(i*TWO_PI/12);
translate(108, 0);
ellipse(0, 0, 12, 12);
popMatrix();
}
stroke(YELLOW);
for (int i=0; i<24; i++) {
if (i%2 != 0)
arc(0, 0, 248, 248, (i-.08)*TWO_PI/24, (i+.08)*TWO_PI/24);
else
arc(0, 0, 248, 248, (i-.55)*TWO_PI/24, (i+.55)*TWO_PI/24);
}
for (int i=0; i<72; i++) {
pushMatrix();
rotate(TWO_PI*i/72);
stroke(RED);
if (i%6 == 0) {
stroke(WHITE);
line(135, 0, 155, 0);
} else
line(144, 0, 147, 0);
popMatrix();
}
stroke(YELLOW);
ellipse(0, 0, 330, 330);
for (int i=0; i<6; i++) {
stroke(RED);
pushMatrix();
rotate(TWO_PI*(i+.5)/6);
translate(188, 0);
quad(-12, 0, 0, 8, 12, 0, 0, -8);
popMatrix();
stroke(255);
pushMatrix();
rotate(TWO_PI*(i+.5-.2)/6);
translate(188, 0);
ellipse(0, 0, 4, 4);
popMatrix();
pushMatrix();
rotate(TWO_PI*(i+.5+.2)/6);
translate(188, 0);
ellipse(0, 0, 4, 4);
popMatrix();
}
stroke(WHITE);
for (int i=0; i<6; i++) {
pushMatrix();
rotate(TWO_PI*i/6);
for (int j=0; j<5; j++) {
stroke(WHITE);
if (j%2 == 0)
stroke(RED);
ellipse(230, 0, 22*(j+.75), 22*(j+.75));
}
stroke(GREEN);
for (int a=0; a<7; a++) {
for (int j=-3; j<= (3- (a%2)); j++)
arc(0, 0, 470 + 15*(a-3), 470 + 15*(a-3),
(j-.2+.5*(a%2))*(.077+.0025*(a-2)) + PI/6, (j+.2+.5*(a%2))*(.077+.0025*(a-2)) + PI/6);
}
popMatrix();
}
stroke(WHITE);
for (int i=0; i<12; i++) {
pushMatrix();
rotate((i+.5)*TWO_PI/12);
translate(330, 0);
stroke(WHITE);
ellipse(0, 0, 12, 12);
popMatrix();
}
for (int i=0; i<12; i++) {
stroke(RED);
if (i%2 == 0)
stroke(GREEN);
pushMatrix();
rotate(i*TWO_PI/12);
translate(330, 0);
if (i%2 == 0) {
line(-10, -10, 10, 10);
line(-10, 10, 10, -10);
} else {
line(-8, -8, 8, 8);
line(-8, 8, 8, -8);
}
popMatrix();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment