usingMakiexyvec=rand(Point2f0,(2)).*5.+1velvec=rand(Point2f0,(2)).*10# define some other parameterst=0ts=0.03balldiameter=1origin=Point2f0(0,0)xybounds=Point2f0(10,10)N=200scene=scatter(xyvec,markersize=balldiameter,color=rand(RGBf0,2),limits=FRect(0,0,xybounds))s=scene[end]# last plot in scenerecord(scene,"output.mp4",1:N)doi# calculate new ball positionglobalt=t+tsglobalxyvec=xyvec.+velvec.*tsglobalvelvec=map(xyvec,xybounds,origin,velvec)dop,b,o,velboolvec=((p.+balldiameter/2).>b).|((p.-balldiameter/2).<o)velvec=map(boolvec,vel)dob,vb?-v:vendend# plots[1]=xyvecend