So, these particles will need some properties. They need a position in space, and a velocity.
Their position is (x, y, z)
Their velocity is (xv, yv, zv)
Right, so assuming that the Y dimension is negative downwards then we can take gravity to be an
acceleration vector downwards.
Their acceleration is (0, -1, 0).
As was said in the previous article, the acceleration affects the velocity, and the velocity affects the position. So on each loop of the program, the velocity is added to the position and the acceleration is added to the velocity:
loop for each particle erase particle position = position + velocity velocity = velocity + acceleration draw particle end of particle loop end of main loopAnd there you have it. Particle motion is really very simple. Every one of those particles will travel in a nice little parabola.