Random motion


Play with the following applet. Activate the animation and observe how the ball moves.


As you can see the ball does not move in a linear path, as in previous sections. It seems to be moving in different directions and changing its velocity. How is this possible? What kind of mathematics are needed to create this kind of motion? Basically, we are using the same scripts from the previous section: Velocity and Acceleration. The difference here is that the acceleration is changing after a defined period of time. Try to implement a random acceleration in order to show a random motion of the ball. Note: You can download the applet here, so you can compare the method used with yours.