Created
January 13, 2020 18:10
-
-
Save volfegan/0551e21acb64b9940019d2d84c2d17ee to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//based on https://twitter.com/ntsutae/status/1216012181415714819 | |
float C=0, M, W=720; | |
void setup() { | |
size(720, 720); | |
stroke(255); | |
M=W/17; | |
} | |
void draw() { | |
clear(); | |
background(0); | |
C+=3; | |
rotate(PI); | |
translate(-W, -W); | |
for (float i=-M; i<W; i++) { | |
float n=noise((i+C)*.01)-.5; | |
strokeWeight(map( constrain(n, 0, 1), 0, 1, 1, 200)); | |
push(); | |
translate(W/2, i); | |
scale(0.5, .0255); | |
rotate(n*1.4); | |
line(-W/2-M, i, W/2+M, i); | |
pop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment