Skip to content

Instantly share code, notes, and snippets.

@dector
Created March 29, 2011 17:24
Show Gist options
  • Save dector/892807 to your computer and use it in GitHub Desktop.
Save dector/892807 to your computer and use it in GitHub Desktop.
float a = 0.0;
float scaleRot = 2;
void setup() {
size(300, 300, P3D);
}
void draw() {
background(152);
noFill();
a += 0.005;
if(a > TWO_PI) {
a = 0.0;
}
rotateY(scaleRot*a);
translate(50, 50, 0);
//translate(30, 30, 30);
box(40);
translate(150, 150, 0);
beginShape();
vertex(0, 0, 0);
vertex(40, 0, 0);
vertex(20, 0, -20);
vertex(0, 0, 0);
vertex(8, -50, -8);
vertex(32, -50, -8);
vertex(20, -50, -12);
vertex(8, -50, -8);
vertex(32, -50, -8);
vertex(40, 0, 0);
vertex(20, 0, -20);
vertex(20, -50, -12);
endShape();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment