Created
August 30, 2017 01:08
-
-
Save anonymous/1595c92ccb146e9b9bffbc6fdbe6c54d 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
void setup () { | |
background (0); | |
size(800, 800); | |
noLoop (); | |
strokeWeight (2); | |
//slighty thick line for glitch effect | |
} | |
void draw(){ | |
//creates loop | |
for (int i = 0 ; i < 800 ; i = i + 5){ | |
for (int j = 0 ; j < 800 ; j = j + 20){ | |
//copy/paste function numerous times and change the colours | |
drawGlitch (i,j); | |
stroke(220,0,220); | |
drawGlitch (i,j); | |
stroke(255,0,0); | |
drawGlitch (i,j); | |
stroke(0,255,0); | |
drawGlitch (i,j); | |
stroke(0,0,255); | |
drawGlitch (i,j); | |
stroke(200,0,200); | |
} | |
} | |
} | |
//create function w parameters | |
void drawGlitch (int across, int down){ | |
line(across, down, across + 10, down + random(10)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment