O'Reilly logo

Processing Creative Coding and Computational Art by Ira Greenberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11 MOTION

Let the fun begin! I suspect many of you have been waiting patiently (or not so patiently) for this chapter. It took a certain restraint on my part to not start flying pixels around the screen back in Chapter 1. Animation and motion design is usually what gets my students hooked on coding—and even to embrace trigonometry. This chapter, we'll explore all kinds of neat motion (including some trig), from deflecting to bouncing to easing to springing. You'll even create an asteroid shower and learn how to code all sorts of interesting collisions.

Before we dive right into the code, though, I want to discuss very briefly how computer animation works in general, and also some different strategies employed to implement it.

Animation basics ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required