Now,ordinary animate is the obeject moing in fix the coordinate(remote perspective).

But,can we use first person perspective,fix the moving object at the center and just moving(change) the coordinate?

For example,a basketball rotation towards to the basket,can we make this animate just focus on the basketball in the gif center,and change the coordinate?

I think this is a funny question,anyone can give some advice to dynamic change coordinate?

Code example(from Plotting a moving ball for projectile motion with animate)

dt = .01;
velInit = {0, 1.2};
posInit = {1.0, 0};
f[pos_] := -pos/(pos.pos)^(3/2);
vel[{velP_, posP_}] := velP + f[posP] dt
pos[{velP_, posP_}] := posP + vel[{velP, posP}] dt

orbit = NestList[{vel@#, pos@#} &, {velInit, posInit}, 1500][[All, 2]];

Animate[ListPlot[orbit, Joined -> True, 
                Epilog -> {PointSize@.05, Purple, Point[orbit[[j]]]}], 
{j, 1, 1500, 1}]

As we can see,the ball is moving in the fix coordinate.Why not try to fix the ball in the center and then just change the coordinate. i knew in matlab can use 'Set' handle function to dynamic control the coordinates.Well maybe this example isn't benifit to use first-person perspective animate.Just for the question! Aha.

ViewPoint/ViewVector and related options maybe works,i'am doing.Thank you,@Kuba. enter image description here


closed as unclear what you're asking by wxffles, gpap, José Antonio Díaz Navas, MarcoB, eyorble Aug 31 '18 at 23:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Ps.In matlab,you can use 'set' function to dynamic change the coordinate,and export the animate. $\endgroup$ – Ben Aug 21 '18 at 3:51
  • $\begingroup$ you will find Vitaliy Kaurov - Mastering Dynamic Visualizations with Mathematica very useful. $\endgroup$ – kglr Aug 21 '18 at 5:24
  • $\begingroup$ Take a look at ViewPoint/ViewVector and related options, come up with simple example and let us know where are you stuck. $\endgroup$ – Kuba Aug 21 '18 at 5:27
  • $\begingroup$ This one can help too: 3538 $\endgroup$ – Kuba Aug 21 '18 at 5:28
  • 1
    $\begingroup$ I assumed you have 3D case in mind, try with PlotRange for 2D. $\endgroup$ – Kuba Aug 21 '18 at 5:59
  dt = .01,
  velInit = {0, 1.2},
  posInit = {1.0, 0},
  f, vel, pos, orbit
 f[pos_] := -pos/(pos.pos)^(3/2);
 vel[{velP_, posP_}] := velP + f[posP] dt;
 pos[{velP_, posP_}] := posP + vel[{velP, posP}] dt;
 orbit = NestList[{vel@#, pos@#} &, {velInit, posInit}, 1500][[All, 
   , Joined -> True
   , AspectRatio -> 2/3
   , PlotRange -> {{-3, 3}, {-2, 2}} + orbit[[j]]
   , Epilog -> {PointSize@.05, Purple, Point[orbit[[j]]]}
   , PlotTheme -> "Scientific"

  , {j, 1, 1500, 1}

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.