Message Boards Message Boards

0
|
3537 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to animate ListPointPlot3D?

Posted 3 years ago

Problem description: I have a list of 3 columns (x,y,z) and several rows and I did a ListPointPlot3D to that list. It gives a particle trajectory in 3D space, but it gives it after it is completely done.

What I want is: How can I animate this such that I could see each point being plotted and hence trace the path of the particle?

I saw Animate, ListAnimate, and Manipulate, but could not use them appropriately with ListPointPlot3D.

Thanks in advance

POSTED BY: Ayman hosny
3 Replies
Posted 3 years ago

Thanks a lot. It perfectly worked!

POSTED BY: Ayman hosny

I would generate a list of sub list of length 1 to length of your list using Take. And then generate a list of listlineplots3d(with fixed plotrange) using a pure function or Table and then animate the list of plots using Animate. Good luck.

POSTED BY: Jack I Houng
Posted 3 years ago

Can you adapt something like this

v=Map[Point,Table[RandomReal[{0,1},3],{20}]];
Animate[Graphics3D[Take[v,i],PlotRange->{{0,1},{0,1},{0,1}}],{i,1,Length[v],1},
  AnimationRate->1,RefreshRate->1/4]

The Table in the first line is creating 20 rows of 3 columns, replace that with your actual data.

The Map Point in the first line is wrapping Point around each of your rows.

The Animate is displaying a slide show with each slide taking one more Point from your Table. You will need to adjust the PlotRange to reflect the range of your data points. You can adjust the AnimationRate and RefreshRate once you see how your data looks.

I did approximately the same thing using ListPointPlot3D, discarding the Map Point and Graphics3D, and the results were similar.

POSTED BY: Bill Nelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract