Spring Mass Systems:  Midpoint Method for Solving ODEs


PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

If the system is stiff, i.e., if the constant k is large,
then the time steps will have to be rather small to yield a truthful simulation.
Fortunately there are better methods to solve differential equations.
Here is a first simple improvement:

Midpoint Method


a. Compute an Euler step:
Dx = Dt f(x, t)

b. Evaluate f at the midpoint:
f mid = f( (x + Dx)/2 ,  ( t + Dt)/2 )

c. Take a step using the midpoint value:
x(t +
Dt) = x(t) + Dt fmid

A generalization of this method using higher-order terms in the Taylor series leads to the Runge-Kutta method.

To learn more:

Physically Based Modeling: Principles and Practice -- Particle System Dynamics"  by  Andrew Witkin



PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT
.