Lecture 8 - Review of Hiearchical Modeling

Lab 5 (HM - Hierarchical Modeling) helps practice geometric transforms (placing and building our scene, as well as animating things on objects in a compact way). You also are building all of that in Project 2, so keep that up.

Some things about the obj's:

Also MT on Thursday. It's only based on the lecture exercises and quizzes.

Outline of Hiearchical Modeling

We want to move things relative to each other. The MatrixStack from Lecture 7 - Continuing Matrices#Hiearchial Animation (Geometric Transforms) helps us do that. The base code for the lab starts this by scaling, shifting, and generically transforming a sphere, and adding more parts:

The idea here is that:

Let's think about it step by step. First, we want to scale, then translate, then rotate (to make an angle), then translate to the upper arm. The following pseudocode does this:

// place on body
translate on the L5
rotate SHtheta
translate by Shoulder pivot

// just LA (lower arm)
push 
	translate(where on upper arm)
	rotate(given some angle between the arm parts)
	translate(by Elbow Joint)
	scale(2,1,1)

	drawSphere()
pop

// just UA (upper arm)
scale(4,2,2)
drawSphere()