This function is called once each time step. All position and velocity updates, and all collisions are handled within.
Iterates through each pair of objects in the world, and determines if any are currently overlapping. Currently, only polygons and fixed polygons are supported. *TODO:* Implement collision detection for circles.
Output the current state of the world as a string to be read by png script.
All points in the object are updated one step in accordance with the calculations done on the center of mass point. The object's official position, velocity and acceleration are not updated until self.finish_update().
Can be used to take one step backward in time and undo a pre_update, since each point stores one previous position, velocity and acceleration. Currently, this is used in collision resolution to test out various time steps before choosing one sufficiently close to the time of collision.
The object's position, velocity and acceleration are updated to be consistent with its center of mass.
Velocity Verlet Algorithm to update x,v,a with global error of order 2.
Eventually this update will incorporate the current rotation parameters of the object The update values are the updates applied to the object's center of mass. With rotation, this update will be more complex than a simple addition
init(self, world = None, mass = 1, points = [], speed = np.array([0.0,0.0]), rotation_angle = 0.0, rotation_speed = 0.0)
Computes the moment of inertia by splitting polygon into triangles cornered at self.com.
This prints the polygon object as a string compatible with draw.c. Note: we leave out mass here since that is irrelevant to graphical representation at a fixed point in time.