public static void attract(Body body, Point point, double force) { // Calculate the effect of a force of attraction on a body. // Update the motion of the body. }
public static void collide(Body bodyA, Body bodyB) { // Calculate the effect of two, non-deforming spherical bodies, colliding. // Update the motion of each body. }
public static void accelerate(Body body, double velocity, double direction) { // Calculate the effect of the acceleration on the body. // Update the motion of the body. }