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.

fi g. 2.7<br />

<strong>Processing</strong> 25<br />

<strong>Processing</strong> also has a very handy “ fi nd in reference ” option. Double-click on any keyword <strong>to</strong> select it and<br />

go <strong>to</strong> <strong>to</strong> HELP → FIND IN REFERENCE (or select the keyword and hit SHIFT � CNTRL � F).<br />

2.8<br />

Exercise 2-7: Using the <strong>Processing</strong> reference, try implementing two functions that we have<br />

not yet covered in this book. Stay within the “ Shape ” and “ Color (setting) ” categories.<br />

Exercise 2-8: Using the reference, fi nd a function that allows you <strong>to</strong> alter the thickness of a<br />

line. What arguments does the function take? Write example code that draws a line one pixel<br />

wide, then fi ve pixels wide, then 10 pixels wide.<br />

The “ Play ” But<strong>to</strong>n<br />

One of the nice qualities of <strong>Processing</strong> is that all one has <strong>to</strong> do <strong>to</strong> run a program is press the “ play ” but<strong>to</strong>n.<br />

It is a nice metaphor and the assumption is that we are comfortable with the idea of playing animations,

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

Saved successfully!

Ooh no, something went wrong!