Skip to content

Instantly share code, notes, and snippets.

@brycec
Last active January 26, 2019 13:25
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 brycec/17581bb6e1310a654394ee1c50e7c262 to your computer and use it in GitHub Desktop.
Save brycec/17581bb6e1310a654394ee1c50e7c262 to your computer and use it in GitHub Desktop.
Rotating 3D lines
void setup() {
w=screen.width;
h=screen.height,
size(w,h,P3D);
noStroke();
}
void draw() {
lights();
background(0);
rectMode(CENTER);
fill(255);
translate(w*0.9,h*0.2,0);
for(z=-200;z<99999;z=z+36.6){
pushMatrix();
translate(0,0,-z);
rotateZ(z*0.005);
rect(0,0,3.2,h*10);
popMatrix();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment