Meet with me

in November

10 minutes

Remote Guest Lecture

Friday 10 / 30

Wednesday 11 / 04 / 2020

Assignment 6

Due 11 / 02

Upper Arm

Lower Arm

Hand

q

q (0, 0, 0, 1)

Identity

X

Upper Arm

q

q (0, 0, 0, 1)

Identity

X

q2 (Math.sin(T/2),

0,

0,

Math.cos(T/2))

Rotate 180° in X

T = Math.PI

q

q2

Arm down

Arm up

Time

Frames

Keyframe 2

Keyframe 1

slerp Interpolation

60 FPS

60 Hz

60 1/s

Modern computer screens

Skinning

Skeleton -> Mesh

Rigging

Mesh -> Skeleton

Blender, 3D Studio Max, Maya

Kinematics

Forward Kinematics

Inverse Kinematics

Move down the scene graph

Move up in the scene graph

q

Upper Arm

Hand

q

Upper Arm

Hand

q

Upper Arm

Hand

Multiple Solutions!

Upper Leg

1

2

3

``````Robot.prototype.onAnimate = function() {

if (this.movement == 'raise left arm') {

var T = -Math.PI;
this.left_upperarm.quaternion.slerp( new THREE.Quaternion(Math.sin(T/2),   // x
0,               // y
0,               // z
Math.cos(T/2)),  // w
0.1 );

} else if (this.movement == 'kick') {

// check if slerp reached almost the end
if (this.right_upperleg.quaternion.w < 0.72) {

// signal that the kick is done and the leg should move back
this.movement = 'kick done';

} else {

var T = -Math.PI/2;
this.right_upperleg.quaternion.slerp( new THREE.Quaternion( Math.sin( T / 2 ),   // x
0,                   // y
0,                   // z
Math.cos( T / 2 ) ), // w
0.1 );

}

} else if (this.movement == 'kick done') {

// reset leg back to identity
this.right_upperleg.quaternion.slerp( new THREE.Quaternion(0,0,0,1), 0.1 );

}

};``````

w

during slerp "w" goes from 1 to  0.7

w

By Daniel Haehn

# Lecture 21

Slides for CS460 Computer Graphics at UMass Boston. See https://cs460.org!

• 546