Created
June 24, 2020 12:24
-
-
Save Nekodigi/f50d38f59109d6cc521c8ac5bc560308 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 zoff = 0; | |
void setup(){ | |
//fullScreen(); | |
//size(1000, 1000); | |
size(500, 500); | |
blendMode(ADD); | |
} | |
void draw(){ | |
background(0); | |
strokeWeight(5); | |
PVector o = new PVector(mouseX, 0); | |
int h = height/5*3; | |
for(int i=width/5*2; i<width/5*3; i++){ | |
PVector pos = new PVector(i, height/5); | |
stroke(noise(float(i)/100, zoff)*300-125); | |
PVector diff = new PVector(pos.x-o.x, pos.y-o.y); | |
line(pos.x, pos.y, pos.x+diff.x/diff.y*h, pos.y+h); | |
} | |
zoff+=0.01; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment