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 />

260<br />

//generate wave<br />

float makeWaves(float x, float angle, float amplitude){<br />

x+=sin(radians(angle))*amplitude;<br />

return x;<br />

}<br />

// draw points<br />

void plot(float[]pt){<br />

point(pt[0], pt[1]);<br />

}<br />

Figure 7-14. Curves as particle waves, example 1<br />

Figure 7-15. Curves as particle waves, example 2

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

Saved successfully!

Ooh no, something went wrong!