Integrating particles
Particles are a great place to start any physics engine. This is because particles have mass, but not volume. The lack of volume means we don't have to concern ourselves with rotation. In this section, we will create particles and move them using Euler Integration.
Integration is a way to guess where an object will be in some amount of time. In order to guess the new position of an object, we need to know its position, velocity, and all of the forces acting on the object. We first need to integrate acceleration with respect to time; this will yield the velocity of the object. We next integrate velocity with respect to time; this will yield the updated position of the object. The preceding integrations come right from Newton's Laws of Motion:
- An objects velocity will not change unless affected by an external force
- The acceleration of an object is proportional to the magnitude of the force acting on the object, and inversely proportional to the mass of the object...