06.01.2013 Views

Learning Processing: A Beginner's Guide to Programming Images ...

Learning Processing: A Beginner's Guide to Programming Images ...

Learning Processing: A Beginner's Guide to Programming Images ...

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.

Draw Zoog's legs<br />

stroke(0);<br />

line(x–w/12,y + h,x–w/4,y + h +10);<br />

line(x + w/12,y + h,x + w/4,y + h +10); }<br />

}<br />

Loops 97<br />

Exercise 6-7: Add something <strong>to</strong> your design using a for or while loop. Is there anything you<br />

already have which could be made more effi cient with a loop?<br />

Exercise 6-8: Create a grid of squares (each colored randomly) using a for loop. (Hint: You<br />

will need two for loops!) Recode the same pattern using a “ while ” loop instead of “ for. ”

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

Saved successfully!

Ooh no, something went wrong!