PacktLib: Mastering openFrameworks: Creative Coding Demystified

Mastering openFrameworks: Creative Coding Demystified

Credits

Foreword

About the Author

Acknowledgement

About the Reviewers

www.PacktPub.com

Preface

openFrameworks Basics

About openFrameworks

Installing openFrameworks and running your first example

Installing on Mac OS with Xcode

Installing on Linux with Code::Blocks

openFrameworks' folders

File structure of a project

Code structure of a project

Creating a new project

Creating your first project – the Pendulum example

Running the book's examples

Basic utility functions

Summary

Drawing in 2D

Drawing basics

The background color of the screen

Geometric primitives

Using ofPoint

Coordinate system transformations

Colors

Drawing with an uncleared background

Using FBO for offscreen drawings

Screen grabbing

Additional topics

Summary

Building a Simple Particle System

The basics of particle systems

A single particle

An emitter

The attraction, repulsion, and spinning forces

Graphical user interface

Additional topics

Summary

Images and Textures

Raster and vector images

Loading and drawing an image

Rotating images

Color modulation

Transparency

Creating and modifying images

Using ofTexture for memory optimization

Image warping and video mapping

Using images for internal calculations

Summary

Working with Videos

Video basics

Playing a video file

Controlling the video playback

Processing a single video frame

Processing multiple frames

Processing a live video from the camera

Using image sequence

Summary

Working with Sounds

Sound basics

Playing sound samples

Generating sounds

Using a microphone

Getting spectral data from sound

Summary

Drawing in 3D

3D basics

Simple 3D drawing

Using ofMesh

Drawing sharp edges

Drawing line segments and points

Coloring the vertices

Texturing

Working with vertices

The oscillating plane example

Additional topics

Summary

Using Shaders

Basics of shaders

Structure of a shader's code

A simple fragment shader example

Creating video effects with fragment shaders

Deforming objects with a vertex shader

Using vertex shader in our project

Using a geometry shader

Additional topics

Summary

Computer Vision with OpenCV

Understanding computer vision and OpenCV

Using ofxOpenCv

Working with ofxCv images

Image filtering

Geometrical transformations of images

Searching for objects in an image

Using OpenCV functions

Summary

Using Depth Cameras

Depth camera basics

Installing the ofxOpenNI addon

ofxOpenNI examples

Creating interactive surface

Additional topics

Summary

Networking

Networking basics

Using OSC protocol

Using TCP protocol for streaming images

Summary

Working with Addons

Working with Addons

Working with Addons

Working with Addons

Working with Addons

Working with Addons

Perlin Noise

Perlin Noise

Perlin Noise

Perlin Noise

Perlin Noise

Index