I Wrote a Book

Posted by Jan Vantomme on 24 September 2012.
Tags: , , , ,

Last December, I was asked by Packt Publishing to write a book on Processing 2. I’m happy to announce that my book will be published this week. The title of the book is “Processing 2: Creative Programming Cookbook”. It’s not a book for people who just get started with Processing. For instance: I won’t explain what a variable, or a function is. It’s a book for people who have been using Processing for a while, and want to learn about computer vision, or audio visualisation. The final chapters are a bit more advanced. You’ll explore the new JavaScript and Android modes, and learn the basics to get you started writing your own libraries.

The book is available as paperback and eBook (ePub, PDf & Kindle). You can buy it on the website of Packt Publishing or on Amazon. Here’s the cover and an overview of the contents of the book.

Cover of the Processing 2: Creative Programming Cookbook

Chapter 1: Getting Started with Processing 2

  • 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

Chapter 2: Drawing Text, Curves, and Shapes in 2D

  • 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

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

  • 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

Chapter 4: Working with Data

  • 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

Chapter 5: Exporting from Processing

  • Saving images
  • Exporting applications
  • Saving PDF files
  • Calculating PDF sizes
  • Saving text files
  • Exporting 3D files
  • Saving binary files

Chapter 6: Working with Video

  • 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

Chapter 7: Audio Visualization

  • 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

Chapter 8: Exploring Computer Vision

  • 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

Chapter 9: Exploring JavaScript Mode

  • 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

Chapter 10: Exploring Android Mode

  • 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

Chapter 11: Using Processing with Other Editors

  • 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

Tweet this article

Oldskool Comments (15)

Gravatar for Mark

From: Mark
Date: 24.09.2012

Well done Jan ! Looking forward to reading this. I'm sure it will be a great addition to the library. See you soon ;–] Makr

Top · Permanent link to this comment

Gravatar for Jean-Michel

From: Jean-Michel
Date: 24.09.2012


Top · Permanent link to this comment

Gravatar for Bramus!

From: Bramus!
Date: 25.09.2012


Top · Permanent link to this comment

Gravatar for Henk Lamers

From: Henk Lamers
Date: 30.09.2012

Hi Jan, I’am going through the book right now. One thing I noticed is that you cannot download the code from the PACKT website. I have send them an email about this. Anyway I am typing the code in myself but sometimes it is nice to have the code as a reference to check for typo’s I sometimes make. Also the references to the used fonts/images/sound/video’s of the book are not available. Met vriendelijke groeten, Henk Lamers

Top · Permanent link to this comment

Gravatar for Jan Vantomme

From: Jan Vantomme
Date: 30.09.2012

Henk, The code and reference files should normally be available from the Packt website (probably soon if they aren't on there yet). It would indeed be great if you have access to the code and files I've used to see the expected results. Jan

Top · Permanent link to this comment

Gravatar for Henk Lamers

From: Henk Lamers
Date: 01.10.2012

Jan, I have downloaded the bookfiles and can continue cooking. Met vriendelijke groet, Henk Lamers

Top · Permanent link to this comment

Gravatar for Kasper Jordaens

From: Kasper Jordaens
Date: 01.10.2012

Cool! bring some copies to sell/sign at http://processingghent.org/2012/10/01/meeting-006/ Kasper

Top · Permanent link to this comment

Gravatar for Jan Vantomme

From: Jan Vantomme
Date: 01.10.2012

@Henk Thanks for the update. @Kasper Don't have any copies to sell. But I'm happy to sign books if you bring them.

Top · Permanent link to this comment

Gravatar for Jan Hoebeeck

From: Jan Hoebeeck
Date: 06.10.2012

Nice one, congrats!

Top · Permanent link to this comment

Gravatar for Henk Lamers

From: Henk Lamers
Date: 16.10.2012

Jan, I have read and studied your book 'Processing 2: Creative Programming Cookbook'. I found the recipes very effective, practical and meaningful. It is also very clearly written. The book introduced me for the first time with Processing 2.0. I think it is an improvement that Libraries can now be imported via the Library Manager. The Tool Manager is also an improvement. Rounded corners when drawing rectangles are also fine. That you could manipulate SVG files in Processing I did not know. As regards to 3D Processing I always choose for a specialized 3D package. I work with Lightwave 3D and it has the possibility to do some scripting in Python. I think that in Processing you loose a lot of visual feedback when you have to enter numbers to create polygons but maybe I am wrong. Anyway its fine that the possibility is there (in Processing). The data component was very interesting. Probably I'm going to work on a project with data as a starting point. There are very many things become clearer to me now. The Audio Visualization chapter could, as far as I am concerned, a little bit more extensive. In the computer-vision chapter JAVA quitted several times unexpectedly after running for a few minutes. The JavaScript mode in Processing 2 is also very welcome. Chapter 10 I have not read because I own no Android phone. Pity that there is no iPhone tutorial. Chapter 11 I read halve because I believe that it is still too early for me to build libraries. But maybe I will try to do that in the near future. Also I found it very difficult to use Eclipse. Specially to install everything. But that is maybe because the interface is not so clear. I don’t think it has anything to do with your description. In short, your book, was well spent time and it is great that some money of the sales will be used to support the developing of Processing. I also have a small number of questions/comments that I will post on the PACKT website under the errata. Met vriendelijk groeten, Henk Lamers

Top · Permanent link to this comment

Gravatar for Jan Vantomme

From: Jan Vantomme
Date: 17.10.2012

@Henk Thanks for the comment. For 3D in Processing I usually work with the Hemesh library. This one gives you a lot of control over vertices & faces, and you can easily manipulate 3D data. If you want to run Processing on your iPhone, you'll have to use the JavaScript version. There is no way to compile Processing code to run natively on the iPhone. There are other frameworks like Cinder and openFrameworks, built in C++ that will run on the iPhone. But they are more complicated to use.

Top · Permanent link to this comment

Gravatar for Hensho

From: Hensho
Date: 24.10.2012

Hallo Jan, boek ziet er geweldig uit. Vond een bugje in boek of in Processing: Anders dan je bij de uitleg van de buttons zegt opent ook de NEW button (3) in het open window bij mij een nieuw window, net als wanneer je via het menu een nieuwe sketch wilt beginnen. Dit is onder MacOS 10.7.5 met Processing 2b5. Ciao! Hensho

Top · Permanent link to this comment

Gravatar for Jan Vantomme

From: Jan Vantomme
Date: 24.10.2012

@Hensho Het kan zijn dat er een aantal dingen zijn veranderd in de beta versies van Processing 2 die anders zullen werken dan in het boek. Het eerste hoofdstuk is vorig jaar in december geschreven op basis van een van de eerste alpha versies van Processing 2.

Top · Permanent link to this comment

Gravatar for M.D.

From: M.D.
Date: 23.12.2012

ColorLib is not working with Kuler. Please fix it. It does not work with your example : http://img.vormplus.be/downloads/colorlib_kuler.zip Thank you and congratulations for your book. MD

Top · Permanent link to this comment

Gravatar for Jan Vantomme

From: Jan Vantomme
Date: 25.12.2012

M.D. I know there are some issues with the current version of colorLib. I'm rewriting the library to work with Processing 2 and will release it when that one is out of beta.

Top · Permanent link to this comment