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.”