BM.circle {animation} | R Documentation |
Several points moving in a circle.
BM.circle(n = 20, col = rainbow(n), ...)
n |
number of points |
col |
colors of points |
... |
other parameters passed to points |
This is a solution to the question raised in R-help: https://stat.ethz.ch/pipermail/r-help/2008-December/183018.html.
Invisible NULL
.
Yihui Xie
http://animation.yihui.name/prob:brownian_motion_circle
oopt = ani.options(interval = 0.1, nmax = 300) opar = par(mar = rep(0.5, 4)) BM.circle(cex = 2, pch = 19) ## Not run: ani.options(ani.height = 450, ani.width = 450, outdir = getwd(), interval = 0.05, nmax = 100, title = "Brownian Motion in a Circle", description = "Brownian Motion in a circle.") ani.start() par(mar = rep(0.5, 4)) BM.circle(cex = 2, pch = 19) ani.stop() ## End(Not run) par(opar) ani.options(oopt)