concept game engine in category python
appears as: game engine

This is an excerpt from Manning's book Math for Programmers: 3D graphics, machine learning, and simulations with Python.
What we want to do is to give each of the Asteroid objects a random velocity vector, meaning a pair of numbers (vx, vy), and interpret these to be the constant values of the derivatives of position with respect to time. That is, we assume x’(t) = vx and y’(t) = vy. With that information encoded, we can update the game engine so that the asteroids actually move with those velocities as the game progresses.