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.

creating custom 3D cube, 625–626<br />

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

rotation of cube around XYZ axes, 642<br />

pointers<br />

reference variables, 679<br />

points, 174–176<br />

calculating columns based on number of, 179<br />

changing color of, 174<br />

coding a grid, 185<br />

grid generated from points, 187<br />

grid with spaced-out points, 188<br />

curve created from, 247<br />

drawing natural (imperfect) lines, 179–184<br />

doubly r<strong>and</strong>omized particle line, 181<br />

multiple r<strong>and</strong>omized particle lines, 183<br />

r<strong>and</strong>omized point line, 180<br />

fades creating space, 191–195<br />

multiple points in line sketch, 176<br />

using for loop, 178–179<br />

using while loop, 177–178<br />

point recorder/plotter sketch, 211<br />

points considered as lines, 174<br />

points in geometry, 123<br />

r<strong>and</strong>omized particle spray, 181<br />

single-point sketch, 174<br />

three point sketch, 175<br />

two point sketch, 175<br />

vertex function, 209–214<br />

vertical lines generated from, 185<br />

POINTS mode, 210<br />

polar coordinate system<br />

converting from polar to Cartesian, 228<br />

measuring angles with radians, 757<br />

unit circle, 228<br />

polling<br />

event detection, 139<br />

Polygon class<br />

applying inheritance, 321–323<br />

polygons<br />

area of non-intersecting polygon, 754<br />

generating polygon sketch, 162<br />

generating regular polygon, 647<br />

makePoly function, 230, 359<br />

plotting shapes, 358, 359<br />

polygon creation sketch, 229<br />

Polygon Creator sketch, 362<br />

polygon with second radius (polystar), 230, 235, 237<br />

polygonal table structure, 230, 232<br />

rotating concentric 3D polygons sketch, 164<br />

simple <strong>and</strong> complex polygons, 370<br />

spiral built of, 230, 233, 234<br />

polyhedrons<br />

Interactive Toroid sketch, 669<br />

polymorphism, OOP, 329–331<br />

with interfaces, 331–336<br />

polynomials<br />

see also quadratic curves<br />

cubic curve, 266<br />

first-degree polynomial, 262<br />

generating curves using, 262–267<br />

plot of cubic curve, 267<br />

second-degree polynomial, 263, 264, 265<br />

third- <strong>and</strong> higher-degree polynomial, 266<br />

polystar<br />

polygon with second radius, 230, 235, 237<br />

popMatrix function<br />

altering matrix stack, 714<br />

creating custom 3D cube, 634<br />

Fade-Spin sketch, 409<br />

multiple translations example, 622–624<br />

pushing <strong>and</strong> popping matrices, 409<br />

single axis 3D rotation, 637<br />

Population Explosion sketch, 691<br />

porting programs, 38<br />

POSTERIZE argument, filter function, 458<br />

POSTERIZE Filter sketch, 458<br />

pow function, 265<br />

precedence of operators, 72<br />

Present comm<strong>and</strong>, Sketch menu, 154<br />

primitive data types, 679<br />

Primitive section, <strong>Processing</strong> API, 679<br />

primitive variables, 65–72, 380, 679<br />

primitives (primitive shapes), 340<br />

2D Primitives section, 692<br />

3D Primitives section, 696<br />

Print comm<strong>and</strong>, File menu, 152<br />

print function, 710<br />

argument type, 61<br />

debugging code, 61<br />

mail merge program, 90<br />

printing, 152<br />

printing images<br />

offset printers, 115<br />

println function, 61, 710<br />

debugging, 81, 426<br />

mail merge program, 90<br />

newline escape sequence, 380<br />

printMatrix function, 357<br />

printRecipe method, 312<br />

private keyword<br />

accessing private property, 319<br />

changing property values, 312<br />

data hiding, 319<br />

procedural languages<br />

functions, 32, 62<br />

procedural OOP (poop) approach, 39–40<br />

procedural programming, 58<br />

<strong>Processing</strong> <strong>and</strong> Java, 31<br />

programming language types, 32<br />

procedural programming, 302<br />

structuring a program using <strong>Processing</strong>, 33<br />

INDEX<br />

799

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

Saved successfully!

Ooh no, something went wrong!