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.

drawing rectangle with OOP sketch, 381<br />

encapsulation, 319–320<br />

extends keyword, 469<br />

final keyword, 470<br />

inheritance, 320–323<br />

Object class, 321<br />

OO approach to color/imaging, 469<br />

OOP inheritance diagram, 320<br />

instances of classes, 302<br />

instantiation, 680<br />

interface to <strong>and</strong> implementation of functions, 319<br />

interfaces, 326–328<br />

polymorphism with interfaces, 331–336<br />

method overriding, 726<br />

methods of classes, 302<br />

object-oriented approach to color/imaging, 468–478<br />

abstract class declaration, 470<br />

abstract methods, 471<br />

class constants, 470<br />

getter <strong>and</strong> setter methods, 472<br />

Gradient class, 469<br />

instance properties, 471<br />

LinearGradient class, 472–474<br />

organizing classes using multiple tabs, 478<br />

RadialGradient class, 474–478<br />

object singletons, 678<br />

objects, 33, 378<br />

assigning object reference to extended class, 323<br />

creating objects, 379<br />

polymorphism, 329–331<br />

polymorphism with interfaces, 331–336<br />

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

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

<strong>Processing</strong> OOP program to draw rectangle, 35<br />

programming language types, 32<br />

properties of classes, 302<br />

static keyword, 470<br />

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

this keyword, 473<br />

OPAQUE argument, filter function, 459<br />

Open button, toolbar, 149<br />

Open comm<strong>and</strong><br />

Sketchbook submenu, File menu, 151<br />

OPENGL rendering mode, 166–169<br />

box <strong>and</strong> sphere functions, 696<br />

mapping image onto surface of shape, 699<br />

operations<br />

bitwise operations, 729<br />

operator precedence, 72, 121<br />

operators, 72–76<br />

assignment operators, 75–76<br />

shortcut assignment operation, 184<br />

associative/non-associative properties of, 121–122<br />

binary operators, 76<br />

bitwise operators, 443–448, 767–769<br />

concatenation operator (+), 313<br />

conditional operators, 74<br />

logical <strong>and</strong> operator, 74<br />

logical or operator, 74<br />

decrement operator, 741<br />

increment operator, 741<br />

Logical Operators section, 689<br />

modulus operator, 73, 184, 741<br />

relational operators, 73–74<br />

equal to operator, 73<br />

greater than operators, 73<br />

less than operators, 73<br />

not equal to operator, 73<br />

Relational Operators section, 685<br />

ternary operator, 83<br />

unary operators, 76<br />

Operators section, <strong>Processing</strong> API, 741<br />

or (logical or) operator, 74, 80<br />

Logical Operators section, 689<br />

OR bitwise operator (|), 768<br />

Orb class<br />

asteroid shower animation, 536, 540<br />

Orbiting Text sketch, 740<br />

orbs<br />

asteroid shower animation, 535–551<br />

order of transformations example, 620<br />

origin, coordinate system<br />

ellipse function, 341<br />

rect function, 341<br />

x <strong>and</strong> y axis directions, 109<br />

orthogonal collisions, 521, 525<br />

see also non-orthogonal collisions<br />

asteroid shower animation, 537, 538<br />

oscillons, analog computers, 14<br />

OTF (OpenType) font vector format, 738<br />

OutOfMemoryError<br />

working with large images, 433<br />

Output section, <strong>Processing</strong> API, 710–712<br />

overloaded method, 628<br />

overloading<br />

makePoly function, 362<br />

multiple versions of functions, 100<br />

Window class, 388<br />

overriding, 726<br />

abstract methods, 334<br />

subclasses overriding methods, 331<br />

Overview section<br />

Getting Started comm<strong>and</strong>, Help menu, 157<br />

P<br />

P2D mode, 162<br />

P3D mode, 164–165<br />

argument defining rendering mode, 618<br />

asteroid shower animation, 548, 549<br />

Attributes section functions, 698<br />

box <strong>and</strong> sphere functions, 696<br />

INDEX<br />

797

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

Saved successfully!

Ooh no, something went wrong!