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.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

724<br />

//right wall<br />

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

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

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

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

//roof<br />

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

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

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

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

endShape();<br />

}<br />

}<br />

Figure A-14. FlyThrough sketch<br />

Color<br />

The Color section is divided into two subsections: Setting <strong>and</strong> Creating & Reading. Although<br />

it’s a relatively small section of the API, it’s a very significant one. For the most part, the<br />

Color section is pretty straightforward, with simple background(), fill(), <strong>and</strong> stroke()<br />

functions that take arguments to directly change color. However, there are two issues that<br />

may be new or challenging to newbie coders, which I’ll discuss in the following respective<br />

sections.

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

Saved successfully!

Ooh no, something went wrong!