
4
The Particle
Physics Engine
e now have our first working physics engine. It is capable of simulating the
Wmovement of particles under gravity.
Considering that it is such a simple piece of code, I’ve spent a long time talking
about the theory behind it. This will become important later in the book when we
repeat the same kind of logic for the rotation of objects.
At the moment our engine is fairly limited, as it can only deal with isolated par ti-
cles, and they cannot interact in any way with their environment. Although these are
serious limitations that will be addressed in the next part of the book, we can still do
some useful things with we what ...