I am new to Mathematica. Try to draw a point moving with time. Like at t=0, a point is at p1(coordinates are random numbers); at t=1, this point is at p2. And there is always ONE point on the graph. Below is my code, xy[t_] is the point coordinate at time t in a 2D region.
I have two problems here,
1). Points can be out of this region. How to fix it?
2). All the points are shown on a same graph, how to show only one point at a certain time t?
Any help? Thank you.
xy[t_]=Module[{t},
Table[
If[t<1,{x[0]=0,y[0]=RandomReal[{-1,1}]},
{x[t]=RandomReal[{0,1}],y[t]=RandomReal[{-1,1}]}],{t,0,10}]]
Animate[Graphics[{Red,PointSize[0.05],Point[xy[t]]},
AxesLabel->{"x","y"},
PlotRange->{{0,10},{0,10}}],{t,0,10}]