Differential Equations and Particle Systems€¦ · Active—internal sources of energy user...

32
Differential Equations Thanks to Trueille, Popovic, Baraff, Witkin

Transcript of Differential Equations and Particle Systems€¦ · Active—internal sources of energy user...

Page 1: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Differential Equations

Thanks to Trueille, Popovic, Baraff, Witkin

Page 2: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Physics-based Animation

http://physbam.stanford.edu/~fedkiw/animations/large_pile.avi

Page 3: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 4: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 5: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Describing Physics

source: http://people.rit.edu/andpph/exhibit-8.html

Page 6: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

What variables do we need?

• Position

• Velocity

• Radius

• Mass

• Racquet Info

Dynamic Static

http://p

eople

.rit.e

du/a

ndpph/e

xhib

it-8

.htm

l

• Rotation?

Page 7: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

What Happens Next?

• Position

• Velocity

http://p

eople

.rit.e

du/a

ndpph/e

xhib

it-8

.htm

l

?

Discrete Time:

Continuous Time:

Page 8: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Differential Equations

Page 9: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 10: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 11: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 12: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 13: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 14: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 15: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Two Problems

• Accuracy

• Instability

Page 16: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Accuracy

Consider the equation:

What do the integral curves

look like?

Page 17: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 18: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Problem 2: Instability

• Consider the following system:

Page 19: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Problem 2: Instability

to Neptune!

Page 20: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

Accuracy of Euler Method

Consider Taylor Expansion about x(t)...

constant linear everything

else

Euler step error

Euler’s method has error O(h2)... first order.

How can we get to O(h3) error?

Page 21: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 22: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

The Midpoint Method

• Also known as second order Runge-Kutta:

Page 23: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 24: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

4th-Order Runge-Kutta

Very popular

Page 25: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting

q-Stage Runge-Kutta

General Form:

where:

Find the constant that ensure accuracty O(hn).

Page 26: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 27: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 28: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 29: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 30: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 31: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting
Page 32: Differential Equations and Particle Systems€¦ · Active—internal sources of energy user Computer Graphics 15-462 desired behavior forces and torques Running human model Trotting