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.

Summary<br />

Beginning with <strong>Processing</strong>’s simple shape comm<strong>and</strong>s, rect(), ellipse(), triangle(),<br />

arc(), <strong>and</strong> quad(), this chapter introduced some of the underlying computer graphics<br />

principals involved in generating <strong>and</strong> working with shapes, including the definition of an<br />

origin point, the use of bounding boxes, <strong>and</strong> the concept of state changes. Moving beyond<br />

simple shape functions, you learned about a more general <strong>and</strong> powerful approach for<br />

shape creation, using <strong>Processing</strong>’s vertex() function <strong>and</strong> companion beginShape() <strong>and</strong><br />

endShape() record functions. Utilizing a powerful programming technique called recursion,<br />

you learned about an alternative approach to iterating, including the risk of generating<br />

infinite loops with recursion. You looked under the hood at <strong>Processing</strong>’s matrix<br />

functions <strong>and</strong> how drawing in <strong>Processing</strong> happens internally in a graphics context, which<br />

has its own local coordinate system. Finally, you looked at applying an object-oriented<br />

approach to generating shapes, developed a simple neighborhood example, <strong>and</strong> used an<br />

advanced OOP concept called composition. Next chapter, I’ll introduce color/imaging<br />

techniques using <strong>Processing</strong>, <strong>and</strong> also exp<strong>and</strong> the discussion of OOP to incorporate some<br />

more advanced concepts.<br />

SHAPES<br />

397<br />

9

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

Saved successfully!

Ooh no, something went wrong!