Book Image

Processing 2: Creative Coding Hotshot

By : Nikolaus Gradwohl
Book Image

Processing 2: Creative Coding Hotshot

By: Nikolaus Gradwohl

Overview of this book

Processing makes it convenient for developers, artists, and designers to create their own projects easily and efficiently. Processing offers you a platform for expressing your ideas and engaging audiences in new ways. This book teaches you everything you need to know to explore new frontiers in animation and interactivity with the help of Processing."Processing 2: Creative Coding Hotshot' will present you with nine exciting projects that will take you beyond the basics and show you how you can make your programs see, hear, and even feel! With these projects, you will also learn how to build your own hardware controllers and integrate devices such as a Kinect senor board in your Processing sketches.Processing is an exciting programming environment for programmers and visual artists alike that makes it easier to create interactive programs.Through nine complete projects, "Processing 2: Creative Coding Hotshot' will help you explore the exciting possibilities that this open source language provides. The topics we will cover range from creating robot - actors performing Shakespeare's "Romeo and Juliet", to generating objects for 3D printing, and you will learn how to run your processing sketches nearly anywhere from a desktop computer to a browser or a mobile device.
Table of Contents (16 chapters)
Processing 2: Creative Coding Hotshot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Dance! Dance! Dance!


In this final task of the stick figure dance company project, we finally come to the "company" part. So far, we've created one lonely stick figure dancer that is moving in its own little virtual world. And this is going out of fashion. We will now add some more dancers by cloning the one we've already created; to prevent our dancers from being indistinguishable, we will add a little variation here and there.

To make our code more readable, we will create a new class that holds our stick figure data and is responsible for drawing the body of one figure. This class is also used to store the color and size of each dancer.

We will place the dancers in the draw() method and use the translate() method to draw each dancer in another location on the dancefloor.

Engage Thrusters

Let's add more dancers:

  1. Open the sketch you created in the Making a dancer task, and add a new class by clicking on the little arrow icon on the right and choosing New Tab from the menu. The new class is called...