From last time…
• Briefly 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!
http://git-scm.com/book
–Former Co-Worker
“Unless you have a hacksaw or a screwdriver,
you can’t break anything…”
CAP
Translation &!
Rotation II
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
• scale()
Demo!
Square Rotation
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.”
Demo!
Guilty Pleasure
https://www.youtube.com/watch?v=Eje28TK4D00
For next time…
• Read Shiffman, pp. 255–264, Images I

24. Translation & Rotation II