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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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 + shiftY, -d/2 + shiftZ);<br />

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

endShape();<br />

//back face<br />

beginShape(QUADS);<br />

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

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

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

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

endShape();<br />

//left face<br />

beginShape(QUADS);<br />

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

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

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

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

endShape();<br />

//right face<br />

beginShape(QUADS);<br />

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

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

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

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

endShape();<br />

//top face<br />

beginShape(QUADS);<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 />

endShape();<br />

//bottom face<br />

beginShape(QUADS);<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 />

}<br />

}<br />

PROCESSING LANGUAGE API<br />

717<br />

A

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

Saved successfully!

Ooh no, something went wrong!