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.

INDEX<br />

780<br />

clipping planes, frustum, 719<br />

clocks<br />

Analog Clock sketch, 709<br />

CLOSE argument, endShape function, 699<br />

line loops, 226<br />

plotting shapes, 359<br />

Close, Chuck, 111<br />

code<br />

debugging code, print function, 61<br />

printing code, 152<br />

representing lines with, 174–237<br />

structuring code, 32<br />

code art, interactivity with, 564<br />

code artists, 14–24<br />

code layout<br />

Auto Format comm<strong>and</strong>, Tools menu, 155<br />

code libraries<br />

organizing into packages, 154<br />

coding<br />

see also <strong>Processing</strong> programs<br />

algorithmic tree, 45–53<br />

arrays, 83–85<br />

case sensitivity of variable names, 65<br />

comments, 60<br />

conditional statements, 76–83<br />

curly braces { }, 61<br />

dot (.) syntax, 62<br />

Format for Discourse comm<strong>and</strong>, 157<br />

functions, 96–103<br />

learning from coding mistakes, 44<br />

literals, 64<br />

loops, 85–96<br />

operators, 72–76<br />

programming modes, 158<br />

structure in coding, 58<br />

switch statements, 81–82<br />

text editor, <strong>Processing</strong> window, 147<br />

use of indentation, 62<br />

variables, 65–72<br />

whitespace, 60<br />

coding in 3D, 616–672<br />

3D engine, 618<br />

3D rotations, 635–646<br />

3D transformations, 618–624<br />

computer optimization for rendering, 651<br />

constructing brick tower, 647–650<br />

creating custom cube, 625–635<br />

Cube class, 626–634<br />

cube to pyramid to cone to cylinder, 657–662<br />

extrusion, 650–657<br />

lathing, 663<br />

P3D rendering engine, 616<br />

perspective, 618<br />

Point3D class, 625–626<br />

<strong>Processing</strong> built-in 3D support, 616<br />

rotation of rectangle around XYZ axes, 639<br />

software options, 616<br />

sphereDetail function, 696<br />

Spinning 3D Stuff sketch, 697<br />

spinning cube, 616<br />

toroids, 662–671<br />

Cohen, Harold, 16<br />

collapse panes buttons, <strong>Processing</strong> window, 150<br />

Collections framework, Java, 39<br />

collision detection, 487–491<br />

asteroid shower animation, 536, 550<br />

checkCollisions function, 99<br />

detectCollision function, 689<br />

falling r<strong>and</strong>om bouncing str<strong>and</strong>s, 252<br />

moving box across screen, 99<br />

Collision Detection <strong>and</strong> Timeout sketch, 491<br />

collisions<br />

1D collisions, 552–556<br />

accounting for mass, 555<br />

using Conservation of Momentum sketch, 557<br />

with Swapping Velocities sketch, 554<br />

2D collisions, 557–561<br />

non-orthogonal 2D collisions, 557<br />

using Conservation of Momentum sketch, 559<br />

applying vectors in collisions, 525<br />

asteroid shower animation, 535–551<br />

checkBoundaryCollision function, 552<br />

checkObjectCollision function, 552<br />

h<strong>and</strong>ling non-orthogonal collisions, 532–534<br />

by rotating coordinates, 532<br />

inter-object collisions, 552–561<br />

law of reflection, 525–532<br />

object collisions, 520–534<br />

orthogonal collisions, 521, 525<br />

orthogonal vs. non-orthogonal collisions, 525<br />

color<br />

24-bit color, 113<br />

48-bit color, 114<br />

8-bit color, 114<br />

accessing individual color component values, 422<br />

Alpha sketch, 407<br />

bits per pixel, 400<br />

bitwise operations, 443–448<br />

brightness vs. darkness of, 402<br />

changing color of points, 174<br />

chromatic intensity property, 402<br />

Color Shift sketch, 401<br />

controlling alpha transparency, 406–408<br />

dithering, 114<br />

Fade-Spin sketch, 408<br />

fades creating space, 191–195<br />

generating a color, 729<br />

horizontal <strong>and</strong> vertical fade to black, 193<br />

horizontal fade to black, 191<br />

hue property, 402

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

Saved successfully!

Ooh no, something went wrong!