You can use the Verlet integration. Make a FOR loop containing: X=X+ ??? Y=Y+ ??? VX=X[I]-OLDX[I]*FRICTION VY=Y[I]-OLDY[I]*FRICTION OLDX[I]=X[I] OLDY[I]=X[I] X=X+VX Y=Y+VY the arrays OLDX and OLDY are needed