09.04.2016 Views

www.ebook777.com

Make_Getting_Started_with_Processing_Second_Edition

Make_Getting_Started_with_Processing_Second_Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pushMatrix ( ) function, 83<br />

R<br />

radians, 18-20<br />

random ( ) function, 109-111<br />

random movements, 109-111<br />

rectangles<br />

cursor position relative to,<br />

64-66<br />

drawing, 16<br />

rectMode ( ) function, 22<br />

Reference and Examples, 11-12<br />

relational expression, 42-43<br />

relational operators, 42<br />

RGB color, 26<br />

robot programs (examples)<br />

arrays of objects, 162-164<br />

drawing P5 robot, 32-33<br />

drawRobot function, 131-133<br />

generating and reading data<br />

files, 180-182<br />

loading images from SVG/PNG<br />

files, 101-102<br />

modifying code with variables,<br />

47-48<br />

mouse-responding shapes,<br />

72-74<br />

objects, 147-148<br />

random and circular movements,<br />

118-119<br />

translate, rotate, and scale in,<br />

85-87<br />

rotate ( ) function, 77<br />

rotating coordinate system, 77-81<br />

rows and columns, creating with for<br />

loops, 45<br />

rule of variable scope, 211<br />

S<br />

Save command, 11<br />

saveFrame ( ) function, 189<br />

scale ( ) function, 82<br />

scaling shapes, 82-83<br />

scope, variable, 211<br />

sensors, reading, 194-195<br />

Serial Library, 193<br />

setup ( ) function, 50-51<br />

shape ( ) function, 98<br />

shapeMode ( ) function, 98<br />

shapes, 97-100<br />

creating new, 99-100<br />

drawing basic, 14-19<br />

drawing with, 98<br />

moving (see animation)<br />

properties, 21-22<br />

scaling, 98-99<br />

wrapping around screen,<br />

105-107<br />

sin ( ) and cos ( ) functions, 113-116<br />

sine wave values/movement,<br />

115-116<br />

size ( ) function, 14, 38<br />

sketching, 1-2<br />

creating/saving sketches, 10-11<br />

exporting sketches, 11<br />

Sketch menu, 10<br />

smoothing lines with easing, 55<br />

sound, 184-189<br />

fundamentals of, 187<br />

microphones, 186-188<br />

playing, 185-186<br />

sine wave, 187-189<br />

SoundFile class methods, 186<br />

spirals, creating, 116<br />

String data, 135, 166, 207<br />

string values, 67<br />

strings, storing text in, 97<br />

stroke ( ) function, 23, 25<br />

stroke weight consistency, 83<br />

strokeCap ( ) function, 21<br />

strokeJoin ( ) function, 22<br />

strokeWeight ( ) function, 21<br />

SVG format, vector shapes in, 93<br />

T<br />

Table data, 166-172<br />

tabs, 145<br />

test statement, 41-42<br />

text<br />

drawing in boxes, 96<br />

storing in strings, 97<br />

text ( ) function, 68, 95<br />

Index 217

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

Saved successfully!

Ooh no, something went wrong!