kinematics & dynamics - hallymgraphics.hallym.ac.kr/teach/2005/cga/src/10kindy.pdf · 2008. 9....
TRANSCRIPT
Computer Graphics
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Kinematics & Dynamics
December 07, 2005
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Overview
Kinematicsconsidering only motion
determined by positions, velocities, accelerations
Dynamicsconsidering underlying forces
computing motion from initial conditions and physics
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Example: 2-Link Structure
Two links connected by rotational joints
“End-Effector”
X=(x, y)
(0, 0)
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Forward Kinematics (1)
Specifying joint angles: Θ1 and Θ2
Computing positions of end-effector: X
X=(x, y)
(0, 0)
( ) ( )( )2121121211 sinsin ,coscosX Θ+Θ+ΘΘ+Θ+Θ= llll
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Forward Kinematics (2)
Specifying joint motions by spline curves
X=(x, y)
(0, 0)
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Forward Kinematics (3)
Specifying joint motions by initial conditions and velocities
X=(x, y)
(0, 0) ( ) ( )
1.02.1
2500600
21
21
−=Θ
=Θ
°=Θ°=Θ
dt
d
dt
d
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Example: 2-Link Structure
End-effector positions target positions
“End-Effector”
X=(x, y)
(0, 0)
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Inverse Kinematics (1)
Specifying end-effector positions: X
Computing joint angles: Θ1 and Θ2
X=(x, y)
(0, 0)
( ) ( )( ) ( )xllyl
yllxl
ll
llyx
22122
221221
21
22
21
221
2
cossin
cossin
2cos
Θ++ΘΘ++Θ−
=Θ
⎟⎟⎠
⎞⎜⎜⎝
⎛ −−+=Θ −
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Inverse Kinematics (2)
Specifying end-effector positions by splinecurves
X=(x, y)
(0, 0)
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Inverse Kinematics (3)
Problem for more complex structuresusually under-defined system of equations
multiple solutions
X=(x, y)
(0, 0) Three unknowns: Θ1, Θ2, Θ3Two equations: x, y
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Inverse Kinematics (4)
Solution for more complex structuresfinding the best solution (ex. minimizing energy in motion)
non-linear optimization
X=(x, y)
(0, 0)
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Summary
Forward kinematicsspecifying conditions (joint angles)
computing positions of end-effectors
Inverse kinematics“goal-directed” motion
specifying goal positions of end effectors
computing conditions required to achieve goals
Inverse kinematics provides easier specification for many animation tasks, but it is computationally more difficult
Inverse kinematics provides easier specification for many animation tasks, but it is computationally more difficult
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Overview
Kinematicsconsidering only motion
determined by positions, velocities, accelerations
Dynamicsconsidering underlying forces
computing motion from initial conditions and physics
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Dynamics
Simulation of physics insuring realism of motion
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Space Time Constraints (1)
Specifying constraintscharacter’s physical structure
ex) articulated figure
character’s actionex) jumping from here to there within time t
other physical structuresex) floor to push off and land
how to perform the motionex) minimizing energy
Computing the “best” physical motionsatisfying constraints
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Space Time Constraints (2)
Example: particle with jet propulsionx(t): position of particle at time t
f(t): force of jet propulsion at time t
particle’s equation of motion:
moving from a to b within t0 to t1 with minimum jet fuel:
0=−−′′ mgfxm
( ) ( ) ( ) btxatxdttft
t==∫ 10
2 and subject to Minimizing
1
0
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Space Time Constraints (3)
Discretizing time steps
bxaxfh
mgfh
xxxxm
h
xxxx
h
xxx
ii
iiii
iii
ii
==
=−−⎟⎠⎞
⎜⎝⎛ +−
=′′
+−=′′
−=′
∑
−+
−+
−
10
2
211
211
1
and subject to Minimizing
02
2
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Space Time Constraints (4)
Solving with iterative optimization methods
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Space Time Constraints (5)
Advantagesnot having to specify details of physically realistic motion with spline curves
easy to vary motions due to new parameters and/or new constraints
Challengesspecifying constraints and objective functions
avoiding local minima during optimization
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Adapting Motion (1)
Original Jump
Heavier Base
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Adapting Motion (2)
Hurdle
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Adapting Motion (3)
Ski Jump
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Editing Motion
Original Adapted
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Morphing Motion
The female character morphs into a smaller character during her spine
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Other Physical Simulations
Rigid bodies
Soft bodies
Cloth
Liquids
Gases
Etc. Cloth
Hair
Smoke
Fluid
Sun-Jeong Kim http://www.hallym.ac.kr/~sunkim/teach/2005/cga
Summary
Kinematicsforward kinematics
specifying joints (hard)computing end-effectors (easy)
inverse kinematicsspecifying end-effectors (easier)solving joints (harder)
Dynamicsspace-time constraints
specifying structures & constraints (easiest)solving motion (hardest)
other physical simulations