Skip to content

Non constant time intervals between animation frames

yihui edited this page Aug 12, 2011 · 2 revisions

Non-constant time intervals between animation frames

In most cases, the time interval between animation frames is a constant, but we can use a vector of time intervals for the GIF animations. Here is an example:

saveGIF({
    brownian.motion(pch = 21, cex = 5, col = "red", bg = "yellow")
},
    movie.name = 'brownian_motion2.gif',
    interval = runif(30, .01, 1), nmax = 30)

Non-constant time intervals between animation frames

The intervals are generated from uniform random numbers.