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.

modes<br />

ellipseMode function, 342, 343<br />

multimode capability of <strong>Processing</strong>, 144<br />

programming modes, 158–162<br />

basic mode, 158<br />

continuous mode, 159–161<br />

Java mode, 162<br />

QUADS mode, beginShape(), 369, 370<br />

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

rectMode function, 110, 341, 342<br />

rendering modes, 162–169<br />

JAVA2D mode, 162–163<br />

OPENGL mode, 166–169<br />

P2D mode, 162<br />

P3D mode, 164–165<br />

shape modes, 368–374<br />

state change following rectMode call, 342<br />

textMode function, 740<br />

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

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

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

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

Mohr, Manfred, 23<br />

moiré patterns, 134, 136<br />

momentum, law of conservation of, 555<br />

monitor screen resolution, 115, 678<br />

month function, 708<br />

Moock, Colin, 23<br />

motion<br />

see also animation<br />

accelerated motion, 129<br />

adding fading to sketch, 491<br />

collision detection, 487–491<br />

collisions<br />

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

easing, 500–505<br />

elapsed time, 491<br />

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

1D collisions, 552–556<br />

2D collisions, 557–561<br />

law of reflection, 525–532<br />

linear motion, 129<br />

object collisions, 520–534<br />

object interactions, 500–520<br />

simulating physics, 492–499<br />

soft-body dynamics, 516–520<br />

speed, 128<br />

springing, 505–511<br />

simulating spring behavior, 511–516<br />

vectors, 521–522<br />

applying vectors in collisions, 525<br />

normalizing vectors, 523–525<br />

Motion Painter sketch, 611<br />

motion sketch, 497, 499<br />

mouse events, 139, 565–590<br />

adding interface elements, 579–590<br />

detecting mouse events on buttons, 579<br />

detecting multiple mouse clicks, 612<br />

detecting which mouse button is pressed, 566<br />

Final Interactive Button sketch, 582–590<br />

First Button sketch, 579–580<br />

Interactive Button sketch, 580–582<br />

mouse click/drag/move detection, 565<br />

mouse move events, 589, 590<br />

mouse press events, 566, 588<br />

mouse release detection, 565<br />

mouse release events, 567, 589<br />

<strong>Processing</strong> creating drawing application, 590–603<br />

Mouse section, <strong>Processing</strong> API, 702<br />

MouseAdapter class, Java, 565<br />

mouseButton system variable, 566<br />

mouseDragged function, 568, 702<br />

MouseListener interface, Java, 564, 565<br />

mouseMoved function, 569, 702<br />

automatic syntax color highlighting, 568<br />

Drawing Application example, 600<br />

Final Interactive Button example, 589, 590<br />

mousePressed function, 566<br />

automatic syntax color highlighting, 568<br />

detecting mouse events on buttons, 580<br />

Drawing Application example, 599, 600<br />

Final Interactive Button example, 588<br />

shape builder <strong>and</strong> animator example, 578<br />

Tile Designer sketch, 735<br />

mousePressed variable, 566, 598, 702<br />

mouseReleased function, 567, 568<br />

automatic syntax color highlighting, 568<br />

Drawing Application example, 600<br />

Final Interactive Button example, 589<br />

Tile Designer sketch, 736<br />

mouseX variable, 702<br />

moveShape function, 575, 578, 579<br />

Moving Along a Vector sketch, 524<br />

moving mouse see mouseMoved function<br />

Multi Modes sketch, 418<br />

multidimensional arrays, 213<br />

multiple inheritance of interface, 326, 331<br />

multiple translations example, 620<br />

multiplication<br />

multiplying algebraic expressions, 122<br />

operator precedence, 121<br />

shortcut assignment operation, 184<br />

Musgrave, Ken, 23<br />

N<br />

Nakamura, Yuko, 23<br />

naming conventions/rules<br />

camelback notation, 63<br />

case sensitivity of variable names, 65<br />

class constructors, 309<br />

INDEX<br />

795

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

Saved successfully!

Ooh no, something went wrong!