Created
February 3, 2019 03:00
-
-
Save iRGBit/0356c4941693eb22a7e9546e658f66a4 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
// #164 | |
// All two-part combinations of blue arcs from corners and sides, and blue straight, not straight, and broken lines. | |
size(600, 600); | |
background(#FCE8FA); | |
noFill(); | |
for (int i =0; i<300; i++) { | |
stroke(#0038CB); | |
arc(0, random(height), random(width), random(height*.5), random(0, PI), random(PI, TWO_PI)); | |
} | |
for (int i =0; i<300; i++) { | |
stroke(#0038CB); | |
arc(0, random(height), random(width), random(height*.5), random(0, PI), random(PI, TWO_PI)); | |
} | |
stroke(255, 0, 0); | |
for (int i =0; i<200; i++) { | |
float dash = random(10,40); | |
int x1 = width; | |
int y1 = int(random(height)); | |
int x2 = int(random(width*.2, width)); | |
int y2 = int(random(height)); | |
float _x = 0; | |
float _y = 0; | |
for (int j = 0; j <= int(random(10, 40)); j++) { | |
float x = lerp(x1, x2, j/dash) + dash; | |
float y = lerp(y1, y2, j/dash); | |
if (j%2==0) { | |
noStroke(); | |
} else { | |
stroke(#032EA0); | |
} | |
line(x, y, _x, _y); | |
_x = x; | |
_y = y; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment