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.

<strong>Coding</strong> a grid<br />

To begin, I’ll show you how to generate a simple grid. First, you’ll generate some columns<br />

of equally spaced parallel points (see Figure 6-10). This code should look similar to what<br />

you’ve been doing thus far.<br />

size(300, 300);<br />

background(0);<br />

int cellWidth = width/30;<br />

stroke(255);<br />

//vertical lines<br />

for (int i=cellWidth; i

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

Saved successfully!

Ooh no, something went wrong!