ani.start()
op = par(mar = c(3, 3, 2, 0.5), mgp = c(2, .5, 0), tcl = -0.3,
cex.axis = 0.8, cex.lab = 0.8, cex.main = 1)
brownian.motion(control = ani.control(interval = 0.05, nmax = 100,
height = 500, width = 600, saveANI = TRUE))
par(op)
ani.stop()
Run the code above in your browser using DataLab