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.

TRIANGLES mode, beginShape(), 368, 369<br />

number of vertex comm<strong>and</strong>s, 371<br />

R<strong>and</strong>om Triangles sketch, 369<br />

TRIANGLE_FAN mode, beginShape(), 372<br />

tessellation, shapes, 374<br />

triangulation using, 375–377<br />

TRIANGLE_STRIP mode, beginShape(), 372<br />

creating a spiral, 373–374<br />

using, 372–373<br />

triangulation, 374<br />

TRIANGLE_FAN mode, 375–377<br />

triBlur function, 347<br />

trigonometry<br />

creating curves using trig, 255–262<br />

history of, 131<br />

math for graphics, 131–138, 755–760<br />

relationship of trig functions, 755<br />

unit circle, 756<br />

Trigonometry section, <strong>Processing</strong> API, 742<br />

trim function, 682<br />

Troubleshooting comm<strong>and</strong>, Help menu, 158<br />

trucks<br />

Toy Truck sketch, 354<br />

true keyword, 86<br />

true color, 114<br />

TTF (TrueType) font vector format, 738<br />

two’s complement system, 765<br />

“Type . . . was not found” error, 148<br />

type casting, 67, 681<br />

type conversions, 67<br />

types see data types<br />

typography, 737<br />

Typography section, <strong>Processing</strong> API, 737–740<br />

U<br />

unary operators, 76<br />

Undo comm<strong>and</strong>, Edit menu, 152<br />

unit circle, 227, 756<br />

UNIVAC computer, 12<br />

universal programming language, 37<br />

updatePixels function, 431, 732<br />

display window changes, 441<br />

Ur game board, 6<br />

user interfaces see GUIs<br />

uv coordinates, 549<br />

UV mapping, 699<br />

V<br />

Valence, 22<br />

value property, color, 402<br />

variables, 65–72<br />

arrays, 83–85<br />

case sensitivity of variable names, 65<br />

declaring primitive variable type, 65<br />

declaring, 66<br />

setting data types when, 67<br />

description, 34<br />

global variables, 70<br />

initializing, 66<br />

legal names, 63<br />

local variables, 70<br />

primitive variables, 65<br />

reference variables, 679<br />

scope, 70, 183, 305<br />

static variables, 383<br />

strict typing, 66–72<br />

types of, 65<br />

Vect2D class<br />

1D collisions, 552<br />

asteroid shower animation, 536, 540<br />

Vect3D class, 554<br />

Vector class, Java, 682<br />

vector graphics, 116–117<br />

curves, 116<br />

description, 115<br />

lines, 116<br />

pixel storage, 116<br />

resolution independence, 117<br />

vector-based approach, drawing application, 590<br />

vector-based typography, 737<br />

vectors, 521–522<br />

applying vectors in collisions, 525<br />

asteroid shower animation, 535–551<br />

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

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

law of reflection, 525–532<br />

Moving Along a Vector sketch, 524<br />

normalizing, 523–525<br />

velocity, 522<br />

velocity see vectors<br />

Verostko, Roman, 17<br />

vertex function, 209–214<br />

2D <strong>and</strong> 3D versions, 210<br />

applying, 219<br />

beginShape/endShape functions, 209, 210<br />

calling vertex functions, 698<br />

combining vertex comm<strong>and</strong>s, 698<br />

disregarded extra vertex calls, 372<br />

plotting shapes, 358<br />

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

using POINTS mode, 210<br />

Vertex section, <strong>Processing</strong> API, 698<br />

vertexCurve function, 281<br />

vertical axis, 109<br />

vertical line, equation for, 243<br />

vertical lines generated from points, 185<br />

vertices<br />

beginShape function, 209<br />

calculating vertices of triangle, 226<br />

curveVertex function, 520<br />

description, 698<br />

drawing methods <strong>and</strong>, 112<br />

function relating to, 209–214<br />

INDEX<br />

809

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

Saved successfully!

Ooh no, something went wrong!