I have a very big list of numbers in a file. They represent locations of pool balls on board over time while they move.
There are $N$ balls, and the points are arrenged such that every $N$ terms on the list are the positions balls at a certain time.
For example, for 2 balls the list:
1 1 1 2 1 1.5 1 2 1 2 1 2.5
Means that the positions of the balls are:
t=t1: ball 1 = {1,1}; ball 2 = {1,2}
t=t2: ball 1 = {1,1.5}; ball 2 = {1,2}
t=t3: ball 1 = {1,2}; ball 2 = {1,2.5}
I want to visualize this list on wolfram mathematica. My question is, what is the most efficient way to do it?
(Of course, my list is a lot bigger then the example list with a lot more points. That means, efficiency is critical for me.)
Previously, I used to get the points as a list into Mathematica:
pos := ReadList["LOCATION OF THE FILE", {Number, Number}]
and then used Graphics to show each time 2 points of the list:
numberOfBalls := N;
Manipulate[
Graphics[
Dynamic[Table[
{Hue[(2 - k)/numberOfBalls], EdgeForm[Thick],
Disk[Reverse[pos[[m + k]]], 0.0265], Black,
Text[Reverse[pos[[m + k]]], {0, 0.06} + Reverse[pos[[m + k]]]]}
, {k, 0, numberOfBalls - 1}]]
]
, {m, 1, Length[pos] - 1, numberOfBalls}]
But I'm sure that there is a better and more efficient way to do this.
The link to the list is here: (With 3 balls)
https://drive.google.com/file/d/1Tuqt-3uxOPpgQxSVxnh5ldf_-_mgd7j9/view?usp=sharing
Thanks a lot!