Upload
esmond-clarke
View
219
Download
0
Embed Size (px)
Citation preview
Integration for physically based animation
CSE 3541Matt Boggus
What is motion?
Observe an object’s position over timeWe could say y = f(time)
Equations of motion – terms
• Position (x,y,z)– Point with respect to the origin
• Velocity (x,y,z)– Speed (vector magnitude)– Direction
• Acceleration (x,y,z)– Rate of change of velocity– Magnitude and direction
r
Equations of motion graph examples
• Initial conditions:– p = 0, v = 5
• If we have the function for acceleration, we can integrate it and use initial conditions to solve for the velocity and position functions
acceleration
velocity
position
Euler integrationFor arbitrary function f(t) with known derivative
)( itf)( itf
ttftftf iii )()()( 1
Step in the direction of the derivative
)( itf
Integration – derivative field
For arbitrary function, f(t)
The force acting on a point may vary in space
SamplingA fixed amount of time passes between frames.Approximate the continuous position curve with discrete samples.
Integration and step size
2.0x
5x
Inaccuracy and instability
Runge Kutta Integration: 2nd orderaka Midpoint Method
• Compute a “full” Euler step
• Evaluate f at midpoint
• Take a step from the original point using the midpoint f value
Runge Kutta Integration: 2nd orderaka Midpoint Method
For unknown function, f(t); known f ’(t)
)( itf
)( itf ttftftfi
ii
)()()(2
11
)(2
1
itf
ttftftf iii
)(2
1)()(
2
1
Step size 2t
Euler Integration
Midpoint Method
Integration comparison
Image from http://www.physics.drexel.edu/students/courses/Comp_Phys/Integrators/simple.html