so i need to generate 10 particles per step in random positions inside the circle to be moving in random directions, and when it hits the wall of the main circle it bounces back and without change in velocity.
I defined the large circle:
yc=0;
rc=5;
ang_c=0:0.01:2*pi;
xpc=rc*cos(ang_c);
ypc=rc*sin(ang_c);
plot(xc+xpc,yc+ypc,'k');
and for now just plotting one particle:
r=0.05;
x=rand;
y=rand;
ang=0:0.01:2*pi;
xp=r*cos(ang);
yp=r*sin(ang);
plot(x+xp,y+yp,'b');
now how to i get the particle to move around in the circle?