Physics Simulation Using R