PacktLib: Processing 2: Creative Programming Cookbook

Processing 2: Creative Programming Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started with Processing 2

Introduction

Installing Processing on your computer

Exploring the Processing Development Environment

Installing libraries

Installing tools

Switching modes

Understanding the coordinate system

Writing your first Processing sketch

Using math functions

Responding to mouse events

Responding to keyboard events

Drawing Text, Curves, and Shapes in 2D

Introduction

Drawing basic shapes

Working with colors

Working with images

Drawing text

Drawing curves

Calculating points on a curve

Drawing custom shapes

Manipulating SVG files

Offscreen drawing

Drawing in 3D–Lights, Camera, and Action!

Introduction

Understanding 3D space

Drawing 3D primitives

Using lights

Making polygon soup

Mixing 2D and 3D objects

Drawing triangle and quad strips

Using textures

Using the 3D camera

Working with Data

Introduction

Loading text files from the hard drive

Parsing CSV

Parsing XML

Converting datatypes

Working with Strings

Working with arrays

Working with ArrayLists

Working with HashMaps

Exporting from Processing

Introduction

Saving images

Exporting applications

Saving PDF files

Calculating PDF sizes

Saving text files

Exporting 3D files

Saving binary files

Working with Video

Introduction

Playing a video

Exporting image sequences

Manipulating pixels in a video

Using filters

Controlling the speed of a video

Jumping to a specific frame

Blending video

Audio Visualization

Introduction

Importing the Minim library

Playing audio files

Using live audio

Drawing a waveform

Using Fast Fourier Transforms

Audio reactive particles

Creating a drum machine

Creating a synthesizer

Using effects

Exploring Computer Vision

Introduction

Using a webcam

Thresholding video

Blob tracking

Color tracking

Installing the OpenCV library

Accessing a webcam with OpenCV

Face detection with OpenCV

Defining the region of interest with OpenCV

Manipulating video with OpenCV

Exploring JavaScript Mode

Introduction

Creating your first Processing sketch for the Web

Creating a custom HTML template

Working with fonts

Working with images/SVG files

Creating 3D sketches for the Web

Using Processing.js without the Processing editor

Writing sketches with JavaScript

Using Processing.js with jQuery

Getting started with the Toxiclibs.js library

Exploring Android Mode

Introduction

Installing the Android SDK

Running your sketch in the Android Emulator

Running your sketch on an Android device

Accessing screen size and density

Responding to touch interaction

Using the accelerometer

Using the GPS

Creating 3D sketches on Android

Adding an icon to your Android App

Using Processing with Other Editors

Introduction

Installing Eclipse

Installing the Processing plugin for Eclipse

Write your first sketch with the Processing Eclipse plugin

Installing the Processing library template in Eclipse

Writing Processing libraries

Installing the Processing tool template

Writing Processing tools

Using Processing with IntelliJ IDEA

Index