Home Comments Thread
New Thread

1 Comment

giscus-bot giscus-bot 2022-12-17 03:20:27
Guest *Rafael Díaz* @ 2018-05-05 03:35:34 originally posted:

I'm trying to simulate the Brownian motion. The problem is that in my simulation the big particle is overlapped by the other particles. The smaller particles should collide with the big particle.

My code

library(animation)  
ani.options(interval = 0.1, nmax = 100)  
par(mar = rep(0.5, 4))  
BM.circle(n=1000, cex = c(5,rep(0.5,999)), pch = 19, col = c(7,rep(4,999)))`

Expected output: https://www.youtube.com/watch?v=Bd9vfs1gFAc

Sign in to join the discussion

Sign in with GitHub