Game Development Reference
In-Depth Information
An example of an ODE is shown in Equation (2.23). It models the motion of a spring and
includes both first- and second-order derivatives. The quantity x represents the displacement
of the spring from its resting position and m is the mass of a weight attached to the end of the
spring. The m parameter models the damping forces that cause the spring to slow down over
time and k is the spring constant that represents how stiff the spring is.
m d 2 x
dt 2
-------- m dx
dt
++ 0
------
kx
=
(2.23)
When modeling the motion of a spring, we want to determine the x-position of the spring
as a function of time. To accomplish this task, we need to solve the ODE shown in Equation (2.23).
To avoid filling your brain with too much math this early in the topic, a discussion of how to
solve ODEs will be deferred to when we study kinematics in Chapter 4. A typical solution to the
spring ODE is shown in Figure 2-9. The spring is initially stretched 0.2 m and then released. The
spring oscillates back and forth, and the oscillations gradually die out over time.
Figure 2-9. The motion of a spring as a function of time
Summary
This chapter provided a brief look at some basic concepts that we will use throughout this
topic. The subjects covered in this chapter will be the tools that we will use to build our physics
models. You learned about the English and SI system of units and how scientific and summation
notation can be used to make equations more readable and compact. The Cartesian and spherical
coordinate systems were introduced. The differences between scalars and vectors were presented.
We discussed matrices—how to multiply them together and how rotation matrices can be used
to rotate coordinate systems. We also looked at derivatives and differential equations.
 
Search WWH ::




Custom Search