Skip to content

Instantly share code, notes, and snippets.

@jkwok91
Created March 13, 2015 22:35
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 jkwok91/4b7df5c3f5b20e2bc287 to your computer and use it in GitHub Desktop.
Save jkwok91/4b7df5c3f5b20e2bc287 to your computer and use it in GitHub Desktop.
lol why
/*
let's generate random fucking cubes in space
*/
void setup() {
size(400,400,P3D);
frameRate(12);
background(0);
}
void draw() {
background(0);
float randomr = (float)Math.random()*10; // lol types who cares
int bbox = width;
for (int i = 0; i < randomr; i++) { // lol types
pushMatrix();
translate((float)Math.random()*bbox,(float)Math.random()*bbox, (float)(Math.random()*bbox)-(bbox/2)); // LOL FLOAT EVERYTHINGGGGGGG
rotateY((float)Math.random()*PI);
rotateX((float)Math.random()*PI);
box(50);
popMatrix();
}
}
/* lol jessica why */
/* lol idfk */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment