Game Development Reference
In-Depth Information
making the substitutions ∆x = ∆ p a , v = v a , and a = a a . Then
these scalar quantities can be plugged into Equation (11.17). Exercise 10
explores this in more detail.
11.7
The Integral
We have just showed that the total displacement of an object in a time
interval is equal to the area under the plot of the object's velocity. We used
the example of constant acceleration, which has a simple graph, and the
area was easy to solve geometrically. We did not pursue in further generality
the limit argument that led us to the surprising equivalence, because this
special case has such compelling applications. Now we are ready to discuss
more general cases. The need to compute a “continuous summation,” where
the rate of growth is a known function, is a common concept in engineering
and science. The calculus tool used to compute these sums is the integral.
If you have already studied integral calculus and have a good intuition
about what the integral is used for, then you can safely skip ahead to
Section 11.8, when our focus returns to the subject of mechanics. However,
if you've never had integral calculus or if your intuition about the integral
is a bit shaky, keep reading.
There are two important ways of approaching the integral. The first
way is essentially to make the notion of “summing up many tiny elements”
a bit more precise and introduce some mathematical formalism. The other
way is to compare the integral to the derivative. It's important to under-
stand both interpretations. The integral is a bit more di cult to grasp
than the derivative, but for reasons that become apparent later, it plays
a much greater role in physics simulations and many other areas of video
game programming. Understanding what the integral does is very impor-
tant, even if the vast assortment of pen-and-paper techniques to compute
integrals analytically is not very useful in our case, being replaced instead
by techniques of numerical integration.
Let's turn our informal summation into mathematics notation, in which
we compute the area under the curve f(x) in the interval a ≤ x ≤ b. We
partition this interval into n slices, each having the width ∆x = (b − a)/n.
The ith rectangle will have a left-hand coordinate x i , a height equal to
f(x i ), and an area of f(x i ) ∆x. Using summation notation, we add up all
these rectangles:
n
Area ≈
f(x i )∆x.
i=1
The error in this approximation decreases as we increase the number
of slices n, and by now, unless you're the new kid in town, you know that
 
Search WWH ::




Custom Search