Book Image

Processing 2: Creative Programming Cookbook

Book Image

Processing 2: Creative Programming Cookbook

Overview of this book

Processing is probably the best known creative coding environment that helps you bridge the gap between programming and art. It enables designers, artists, architects, students and many others to explore graphics programming and computational art in an easy way, thus helping you boost your creativity. "Processing 2: Creative Programming Cookbook" will guide you to explore and experience the open source Processing language and environment, helping you discover advanced features and exciting possibilities with this programming environment like never before. You'll learn the basics of 2D and 3D graphics programming, and then quickly move up to advanced topics such as audio and video visualization, computer vision, and much more with this comprehensive guide. Since its birth in 2001, Processing has grown a lot. What started out as a project by Ben Fry and Casey Reas has now become a widely used graphics programming language. Processing 2 has a lot of new and exciting features. This cookbook will guide you to explore the completely new and cool graphics engine and video library. Using the recipes in this cookbook, you will be able to build interactive art for desktop computers, Internet, and even Android devices! You don't even have to use a keyboard or mouse to interact with the art you make. The book's next-gen technologies will teach you how to design interactions with a webcam or a microphone! Isn't that amazing? "Processing 2: Creative Programming Cookbook" will guide you to explore the Processing language and environment using practical and useful recipes.
Table of Contents (18 chapters)
Processing 2: Creative Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index

A

B

  • background() function /
  • bandpass filter /
  • basic shapes
    • drawing /
  • Beads
    • URL /
  • beginRaw() function /
  • beginRecord() function /
  • beginShape() function /
  • bezier() function /
  • bezierDetail() function /
  • bezierPoint() function /
  • bezierVertex() function /
  • binary() function /
  • binary files
    • saving /
  • blend() function
    • about /
  • blob tracking
    • about /
    • working /
  • blue() function /
  • blur() method /
  • boolean() function /
  • boolean variable /
  • bottomRightX
    • about /
  • bottomRightY
    • about /
  • box() function /
  • brightness() function /
  • brightness() method /
  • bufferSize() method /
  • byte() function /

C

  • <canvas> tag /
  • camera() function /
  • Capture() function
    • about /
  • Capture.list() method
    • about /
  • captureEvent() function
    • about /
  • ceil() function
    • about /
  • char() function /
  • charAt() method /
  • close() method /
  • color() function /
  • colorMode() function /
  • colors
    • working with /
  • Color Selector tool
  • color tracking
    • about /
    • working /
  • color variable /
  • concat() function /
  • containsKey() method /
  • containsPoint() method /
  • contrast() method /
  • coordinate system
    • about /
    • working /
  • copyHeight variable /
  • copyWidth variable /
  • createGraphics() function /
  • createWriter() function /
  • CSV
    • about /
    • parsing /
  • curve() function /
  • curveDetail() function /
  • curvePoint() function /
  • curves
    • drawing /
  • curveTightness() function /
  • curveVertex() function /
  • custom HTML template
    • creating /
    • working /
    • variables /
  • custom shapes
    • drawing /

D

  • 2D and 3D objects
    • mixing /
  • 3D camera
    • using /
    • working /
  • 3D files
    • exporting /
  • 3D primitives
    • drawing /
    • working /
  • 3D scene
    • lights, using /
  • 3D shapes
    • polygon soup, making /
  • 3D sketches
  • 3D space
    • about /
    • enabling /
  • @@description@@ variable
    • about /
  • datatypes
    • converting /
  • ddf.minim.*
    • about /
  • ddf.minim.analysis.*
    • about /
  • ddf.minim.effects.*
    • about /
  • ddf.minim.signals.*
    • about /
  • degrees() function /
  • directionalLight() function /
  • disableStyle() method /
  • DisplayMetrics class / How it works...
  • dist() function
    • about /
    /
  • document.getElementById() function /
  • draw() function
    • about /
    /
  • drawGrid() function /
  • drum machine
    • creating /
    • working /
  • duration() method
    • about /

E

F

  • face detection
    • OpenCV used /
  • FFT
    • using /
    • working /
  • fft.getBand() method /
  • fft.specSize() method /
  • fft buffer /
  • fill() function /
  • filter() function
    • about /
    • modes /
  • filters
    • using, in video /
  • float() function /
  • float variable /
  • floor() function
    • about /
  • flush() method /
  • fonts
    • working with /
  • for loop
    • about /
  • frameRate() function /
    • about /

G

H

  • @@height@@ variable
    • about /
  • HashMaps
    • working with /
  • hasNext() method /
  • hex() function /
  • highpass filter /

I

J

  • JavaScript
    • used, for writing sketches /
  • JavaScript mode
    • about /
    • exploring /
  • join() function /
  • jQuery
    • using, with Processing.js /
  • jump() method
    • about /

K

  • keyPressed() function
    • about /
    /
  • keyReleased() function
    • about /
  • keyTyped() function
    • about /

L

  • League of Moveable Type
  • length() method /
  • lerpColor() function
    • about /
  • libraries
    • installing /
  • Library Manager
    • about /
  • lights
    • using, in 3D scene /
    • working /
  • line() function
    • about /
  • Linux
    • Processing, installing /
  • live audio
    • using /
  • loadBytes() function /
  • loadFont() function /
  • loadImage() function /
  • loadPixels() function
    • about /
  • loadShape() function /
  • loadStrings() function /
  • loadXML() function /
  • localhost /
  • LocationListener interface
  • loop() method
    • about /
  • lowpass filter /

M

  • Mac OS X
    • Processing, installing /
  • mage() function
    • about /
  • map() function /
  • math functions
    • using /
    • println() function /
    • abs() /
    • ceil() /
    • floor() /
    • round() /
    • min() /
    • max() /
    • sq() /
    • sqrt() /
    • dist() /
  • max() function
    • about /
  • maxColorDifference variable /
  • min() function
    • about /
    /
  • Minim
    • about /
  • minim.getLineIn() method /
  • Minim library
    • Sonia /
    • Beads /
    • Ess /
    • importing /
    • ddf.minim.* /
    • ddf.minim.signals.* /
    • ddf.minim.analysis.* /
    • ddf.minim.effects.* /
  • Mobile Processing
    • about /
  • modes, filter() function
    • BLUR /
    • DILATE /
    • ERODE /
    • GRAY /
    • INVERT /
    • OPAQUE /
    • POSTERIZE /
    • THRESHOLD /
  • modes, Processing
    • switching /
    • Standard mode /
    • JavaScript mode /
    • Android mode /
  • MotionEvent class / How it works...
  • motionPressure variable / How it works...
  • mouseButton system variable
    • about /
  • mouseClicked() function
    • about /
  • mouseDragged() function
    • about /
  • mouseMoved() function
    • about /
    /
  • mousePressed() function
    • about /
    /
  • mousePressed system variable
    • about /
  • mouseReleased() function
    • about /
  • mouseX system variable
    • about /
  • mouseY system variable
    • about /
  • movieEvent() function
    • about /
  • MyObject class /
  • mySketch() function /
  • my_first_sketch
    • creating /
    • working /

N

  • new Movie() method
    • about /
  • next() method /
  • noFill() function /
  • noLights() function /
  • noLoop() function /
  • NORMALIZED texture mode /
  • noStroke() function /
  • notch filter /
  • numPixels variable /

O

P

  • PApplet object
    • about /
  • PDE
    • about /
    • exploring /
    • working /
  • PDF files
    • saving /
  • PDF sizes
    • calculating /
  • PeasyCam library /
  • pg.beginDraw() /
  • PGraphics object /
  • PImage object /
  • pixelMode /
  • pixels
    • manipulating, in video /
  • play() method /
  • player.addEffect() method /
  • player.isPlaying() method /
  • player.length() method /
  • player.loop() method /
  • player.pause() method /
  • player.play() method /
  • player.position() method /
  • player.rewind() method /
  • pmouseX system variable
    • about /
  • pmouseY system variable
    • about /
  • point() function
    • about /
  • pointLight() function /
  • points
    • calculating, on curve /
  • Polygon2D constructor /
  • polygon soup
    • making /
    • working /
  • popMatrix() function /
  • popStyle() method /
  • position() method /
  • pressButton() method /
  • println() function
    • about /
    /
  • Processing
    • about /
    • installing /
    • for Windows /
    • for Mac OS X /
    • for Linux /
    • working /
    • Sketchbook /
    • modes, switching /
    • coordinate system /
    • math functions, using /
    • mouse interaction, tracking /
    • keyboard interaction, tracking /
    • basic shapes, drawing /
    • colors, working with /
    • images, working with /
    • text, drawing /
    • curves, drawing /
    • points, calculating on curve /
    • custom shapes, drawing /
    • SVG files, manipulating /
    • offscreen drawing /
    • exporting from /
    • images, saving /
    • applications, exporting /
    • PDF files, saving /
    • PDF sizes, calculating /
    • text files, exporting /
    • 3D files, exporting /
    • binary files, saving /
    • video, playing /
    • audio, working with /
    • webcam, using /
    • video, thresholding /
    • blob tracking /
    • color tracking /
    • OpenCV library, installing /
    • webcam, accessing with OpenCV /
    • face detection, with OpenCV /
    • ROI, defining with OpenCV /
    • video, manipulating with OpenCV /
    • custom HTML template, creating /
    • fonts, working with /
    • images/SVG files, working with /
    • 3D sketches, creating /
    • sketches, writing with JavaScript /
    • using, with IntelliJ IDEA / Getting ready, How to do it...
  • processing.draw = function(){} line /
  • Processing.js
    • URL /
    • using, without Processing editor /
    • downloading /
    • using, with jQuery /
  • processing.setup() = function(){} /
  • Processing 2
    • about /
    • downloading /
  • Processing functions
    • drawGrid() function /
    • about /
    • rect() function /
    • ellipse() function /
    • triangle() function /
    • quad() /
  • Processing libraries
  • Processing library template
  • Processing plugin
  • Processing sketch
  • Processing tools
  • Processing tool template
  • pushMatrix() function /
  • pushStyle() method /
  • put() method /

Q

  • quad() /
  • quad strips
    • about /
    • drawing /
  • QUAD_STRIP parameter /

R

  • radians() function /
  • read() method
    • about /
  • rect() function /
  • remove() method /
  • render() method /
  • reverse() function /
  • RGB and HSB color modes
    • using /
  • RGB color mode /
  • ROI
    • about /
    • setting, OpenCV used /
    • working /
  • ROI() method /
  • rotateY() function /
  • round() function
    • about /
  • run() method / How it works...

S

  • @@scripts@@ variable
    • about /
  • @@sketch@@ variable
    • about /
  • @@source@@ variable
    • about /
  • saveBytes() function /
  • saveBytes() method /
  • saveFrame() function /
    • about /
  • savePDF variable /
  • screen size and density
  • setup() function
    • about /
    /
  • shape() function /
  • size() function /
    • about /
  • size() method /
  • Sketchbook
    • about /
  • sketches
    • writing, with JavaScript /
  • sketchHeight() function
  • Sketchpad
    • about /
    • URL /
  • sketchRenderer() function
  • sketchWidth() function
  • smooth() function
    • about /
  • snowFlake variable /
  • Software Development Kit (SDK) /
  • Sonia
    • URL /
  • sort() function /
  • specific frame, video
    • jumping to /
  • speed() method
    • about /
  • speed, of video
    • controlling /
  • sphere() function /
  • sphereDetail() function /
  • split() function /
  • spotLight() function /
  • sq() function
    • about /
  • sqrt() function
    • about /
  • Standard mode
    • about /
  • STANDARD mode Processing sketches /
  • start() method
    • about /
  • stop() function /
  • str() function /
  • Strings
    • working with /
  • stroke() function /
  • strokeWeight() function
    • about /
  • subset() function /
  • substring() method /
  • super.surfaceTouchEvent() method / How it works...
  • superArray /
  • surfaceTouchevent() method / How to do it..., How it works...
  • SVG files
    • manipulating /
  • synthesizer
    • creating /
    • working /

T

  • text
    • drawing /
  • text() function /
    • about /
  • textAlign() function /
  • textAscent() function /
  • textDescent() function /
  • textFile.println() method /
  • text files
    • loading, from hard drive /
    • exporting /
  • textFont() function /
  • textLeading() function /
  • texture() function /
  • textureMode() function /
  • textures
    • using /
    • working /
  • textWidth() function /
  • time() method
    • about /
  • toLowerCase() method /
  • Tool Manager
    • about /
  • tools
    • installing /
    • working /
  • topLeftX variable /
  • topLeftY variable /
  • touch interaction
  • toUpperCase() method /
  • Toxiclibs
    • about /
    • downloading /
    • working /
  • translate() function /
  • triangle() function /
  • triangle strips
    • about /
    • drawing /
  • TRIANGLE_STRIP parameter /
  • trigger() method /
  • trim() function /

U

  • unbinary() function /
  • unhex() function /
  • update() method /
  • updatePixels() function
    • about /

V

  • .vlw file format /
  • variables, HTML template
    • @@scripts@@ /
    • @@sketch@@ /
    • @@source@@ /
    • @@id@@ /
    • @@width@@ /
    • @@height@@ /
    • @@description@@ /
  • Vec2D array /
  • Vec2D class /
  • vertex() function /
  • video
    • playing /
    • blending /
    • thresholding /
    • manipulating, OpenCV used /
  • video, creating
    • image sequences, exporting /
    • pixels, manipulating /
    • filters, using /
    • speed, controlling /
    • specific frame, jumping to /

W

  • @@width@@ variable
    • about /
  • wave.setFreq() method /
  • waveform
    • drawing /
    • working /
  • webcam
    • using /
    • working /
    • accessing, OpenCV used /
  • webcam.available() method /
    • about /
  • webcam.read() method
    • about /

X

  • XML
    • about /
    • parsing /
  • xml.getString() method /