Academic Guidance 2015
Mathematics and Population Biology

F. Takasu
Dept. Information and Computer Sciences, Nara Women's University

Random movement

popList=Table[{0.5,0.5},{10}]

ListPlot[popList,PlotRange->{{0,1},{0,1}},AspectRatio->1]

moveIndiv[position_]:=Module[{dx,dy,tmpPosition,d=0.01,angle,positionNew},
angle=Random[] 2 Pi;
dx=d Cos[angle];
dy=d Sin[angle];
positionNew=position+{dx,dy};
Return[positionNew];
]

moveIndiv[{0,0}]

tmp=Map[moveIndiv,popList]

ListPlot[tmp,PlotRange->{{0,1},{0,1}},AspectRatio->1]

tEnd=30

seqList={};
Do[
AppendTo[seqList,popList];
popList=Map[moveIndiv,popList],{t,1,tEnd}
]

gList={};
Do[
g=ListPlot[seqList[[t]],PlotRange->{{0,1},{0,1}},AspectRatio->1];
AppendTo[gList,g],{t,1,tEnd}
]

Show[gList]

ListAnimate[gList]