0

I generated two location lists (x and y coordinates). Now I want to animate the movement(changing x and y) element after element.

The FuncAnimation function of matplotlib seems not to work. The animate(i) function usually uses the timedependent changes of x and y; so a function of i. But I know the timestep and I don't want to implement this dependency in the animate function.

So imagine the lists:

  • x = [2,5,1,5,2,8,5,8]
  • y = [5,3,7,2,0,5,9,3]

with a known timestep

  • dt = 0.1 #seconds

How can I animate this? Thanks in advance!

  • Just to confirm, you want to animate a single dot and not a whole bunch of dots, right? – AJH Apr 18 '22 at 07:47
  • Yes that's kind of right. Imagine a planetary orbit. But in total I have a lot of precalculated Orbits at the same timestep for my universe. – oelbaron Apr 19 '22 at 08:31

0 Answers0