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.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

132<br />

The best way to get a sense of what trig can do is to see it in action. The three code<br />

examples that follow are not intended as a lesson on trig in <strong>Processing</strong>—that begins in<br />

Chapter 6. These examples are intended just to, hopefully, spark your latent zeal for trig<br />

(or at least make you hate it less). I don’t intend newbie coders to be able to follow the<br />

code in these examples (yet).<br />

The first trig example is of a simple repeating sine curve that creates a wave pattern, as<br />

shown in Figure 4-10.<br />

Figure 4-10. Repeating sine curve

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

Saved successfully!

Ooh no, something went wrong!