Last active
September 14, 2019 12:05
-
-
Save Morpholux/c0c69f0da0cc51643b84ee1b1765a298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float [] deltas = new float [8]; | |
void setup() { | |
size(800, 800); | |
background(0); | |
noStroke(); | |
noLoop(); | |
} | |
void draw() { | |
background(250,75,30); | |
curveTightness(0.25); | |
for (int j = 150; j <= 650; j+= 250) { | |
for (int k = 100; k <= 700; k+= 150) { | |
pushMatrix(); | |
translate(j, k); | |
int ampDelta = 5; | |
for (int i = 0; i< deltas.length; i++) { | |
deltas[i] = random(-ampDelta, ampDelta); | |
} | |
beginShape(); | |
curveVertex(-90+deltas[0], -50+deltas[1]); | |
curveVertex(90+deltas[2], -50+deltas[3]); | |
curveVertex(90+deltas[4], 50+deltas[5]); | |
curveVertex(-90+deltas[6], 50+deltas[7]); | |
curveVertex(-90+deltas[0], -50+deltas[1]); | |
curveVertex(90+deltas[2], -50+deltas[3]); | |
curveVertex(90+deltas[4], 50+deltas[5]); | |
endShape(CLOSE); | |
popMatrix(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment