View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
From last time…
• Brieﬂy saw recursion!
• Drew arbitrary shapes with beginShape(),
vertex(), and endShape()
• Saw lots of methods that simulate 3D:!
! translate() and rotate()!
! pushMatrix() and popMatrix()
git/GithubPro Git, Scott Chacon!
“Unless you have a hacksaw or a screwdriver,
you can’t break anything…”
Rotation & Scaling
• ‘Simple’ rotation (rotate()) implies 2D rotation,
i.e. rotating around the z-axis!
• rotateX() // around the x axis
• rotateY() // around the y axis
• rotateZ() // around the z axis
Learning Processing, p. 246
“A nice rule of thumb… is to use pushMatrix()
and popMatrix() before and after translation and
rotation for all shapes so that they can be
treated as individual entities.”