PacktLib: Cinder Creative Coding Cookbook

Cinder Creative Coding Cookbook


About the Authors

About the Reviewers


Getting Started


Creating a project for a basic application

Creating a project for a screensaver application

Creating a project for an iOS touch application

Understanding the basic structure of an application

Responding to mouse input

Responding to key input

Responding to touch input

Accessing files dropped onto the application window

Adjusting a scene after resizing the window

Using resources on Windows

Using resources on iOS and OS X

Using assets

Preparing for Development


Setting up a GUI for tweaking parameters

Saving and loading configurations

Making a snapshot of the current parameter state

Using MayaCamUI

Using 3D space guides

Communicating with other software

How it works...

There's more...

See also

Preparing your application for iOS

Using Image Processing Techniques


Transforming image contrast and brightness

Integrating with OpenCV

Detecting edges

Detecting faces

Detecting features in an image

Converting images to vector graphics

Using Multimedia Content


Loading and displaying video

Creating a simple video controller

Saving window content as an image

Saving window animations as video

Saving window content as a vector graphics image

Saving high resolution images with the tile renderer

Sharing graphics between applications

Building Particle Systems


Creating a particle system in 2D

Applying repulsion and attraction forces

Simulating particles flying in the wind

Simulating flocking behavior

Making our particles sound reactive

Aligning particles to a processed image

Aligning particles to the mesh surface

Creating springs

Rendering and Texturing Particle Systems


Texturing particles

Adding a tail to our particles

How it works…

Creating a cloth simulation

Texturing a cloth simulation

Texturing a particle system using point sprites and shaders

Connecting the dots

Connecting particles with spline

Using 2D Graphics

Drawing 2D geometric primitives

Drawing arbitrary shapes with the mouse

Implementing a scribbler algorithm

Implementing 2D metaballs

Animating text around curves

Adding a blur effect

Implementing a force-directed graph

Using 3D Graphics


Drawing 3D geometric primitives

Rotating, scaling, and translating

Drawing to an offscreen canvas

Drawing in 3D with the mouse

Adding lights

Picking in 3D

Creating a height map from an image

Creating a terrain with Perlin noise

Saving mesh data

Adding Animation

Animating with the timeline

Creating animation sequences with the timeline

Animating along a path

Aligning camera motion to a path

Animating text – text as a mask for a movie

Animating text – scrolling text lines

Creating a flow field with Perlin noise

Creating an image gallery in 3D

Creating a spherical flow field with Perlin noise

Interacting with the User


Creating an interactive object that responds to the mouse

Adding mouse events to our interactive object

Creating a slider

Creating a responsive text box

Dragging, scaling, and rotating objects using multi-touch

Sensing and Tracking Input from the Camera

Capturing from the camera

Tracking an object based on color

Tracking motion using optical flow

Object tracking

Reading QR code

Building UI navigation and gesture recognition with Kinect

Building an augmented reality with Kinect

Using Audio Input and Output

Generating a sine oscillator

Generating sound with frequency modulation

Adding a delay effect

Generating sound upon the collision of objects

Visualizing FFT

Making sound-reactive particles