04.04.2013 Views

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

top face<br />

vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ);<br />

vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ);<br />

vertex(w + shiftX, -h/2 + shiftY, d + shiftZ);<br />

vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ);<br />

//bottom face<br />

vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ);<br />

vertex(w + shiftX, h + shiftY, -d/2 + shiftZ);<br />

vertex(w + shiftX, h + shiftY, d + shiftZ);<br />

vertex(-w/2 + shiftX, h + shiftY, d + shiftZ);<br />

endShape();<br />

//add some rotation to each box for pizazz.<br />

rotateY(radians(1));<br />

rotateX(radians(1));<br />

rotateZ(radians(1));<br />

}<br />

}<br />

Figure 5-14. Screen capture of the Space Junk sketch<br />

THE PROCESSING ENVIRONMENT<br />

169<br />

5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!