Skip to content

Instantly share code, notes, and snippets.

@Nekodigi
Created June 24, 2020 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nekodigi/f50d38f59109d6cc521c8ac5bc560308 to your computer and use it in GitHub Desktop.
Save Nekodigi/f50d38f59109d6cc521c8ac5bc560308 to your computer and use it in GitHub Desktop.
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