New Office

McCormack 3 - 2 1 2

M / W / F      1:00p

Meet with me

in November

10 minutes

Wednesday 10 / 30 / 2019

Assignment 6

Due 10 / 28

Quiz Today!!!

Head

Upper Arm

Lower Arm

Hand

q

q (0, 0, 0, 1)

Identity

X

Head

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

Remote Guest Lecture

Monday 10 / 28

Skinning

Skeleton -> Mesh

Rigging

Mesh -> Skeleton

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!

Head

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

Lecture 22

By Daniel Haehn

Lecture 22

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

  • 578