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

Mission Accomplished


Our mission was to build a spinning 3D globe that resembles the visual aesthetics of the world maps seen on computer displays at the headquarters of heroes and villains in movies from the 80s. We started by creating a spherical mesh in the first task. The mesh consisted of quad strips that warped around our sphere. Finally, we created the coordinates by iterating over our sphere's surface using polar coordinates and converting them to Cartesian coordinates.

In the second task, we filled the faces of our sphere and added a point light source to our world. We then added normal vectors to each vertex to smoothen the shading of our mesh. To make the lighting more even, we switched from our point light source to the default light sources in Processing.

In the third task, we turned our sphere into a globe using a world map as a texture. We extended the vertices of our mesh by the texture coordinates to make sure that the texture fits around our sphere. We also added satellite...