Skip to Main Content
Learning Processing, 2nd Edition
book

Learning Processing, 2nd Edition

by Daniel Shiffman
September 2015
Beginner content levelBeginner
564 pages
13h 28m
English
Morgan Kaufmann
Content preview from Learning Processing, 2nd Edition
14

Translation and Rotation (in 3D!)

What is the Matrix?

—Neo

In this chapter:

 2D and 3D translation

 Using P3D and P2D renderers

 Vertex shapes

 2D and 3D rotation

 Saving and restoring the transformation state: pushMatrix() and popMatrix()

14-1 The z-axis

As you have seen throughout this book, pixels in a two-dimensional window are described using Cartesian coordinates: an x (horizontal) and a y (vertical) position. This concept dates all the way back to Chapter 1, when I discussed thinking of the screen as a digital piece of graph paper.

In three-dimensional space (such as the actual, real-world space where you’re reading this book), a third axis (commonly referred to as the z-axis) refers to the depth of any given point. In a Processing sketch’s ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Make: Getting Started with Processing, 2nd Edition

Make: Getting Started with Processing, 2nd Edition

Casey Reas, Ben Fry

Publisher Resources

ISBN: 9780123947925