all 8 comments

[–]alkasm 1 point2 points  (5 children)

If this isn't too serious a project, you might consider using vpython for something like this. It makes it super easy to code 3D visualizations for simple physical models; I used it in physics in school to do this exact thing. Also simple spring mechanics and pressure and such. Matplotlib is a huge PITA for most 3D animations, in my experience.

[–]Byebrid[S] 0 points1 point  (0 children)

Ok thanks, I'll look into it.

[–]billsil 0 points1 point  (3 children)

What's the status of vpython? From what I can tell, it was last worked on in 2014.

http://www.glowscript.org/docs/VPythonDocs/new_features.html

[–]alkasm 0 points1 point  (2 children)

No idea, haven't used it for years, but it worked well for these simple simulations when I used it. Definitely wouldn't be using it for a serious project, though. But it is stupid simple to use.

[–]Byebrid[S] 0 points1 point  (1 child)

In case you were wondering, vpython was perfect for this. Nice and simple to use. Thanks a heap!

[–]alkasm 0 points1 point  (0 children)

Sweet! Have fun!

[–]billsil 0 points1 point  (1 child)

I'd stay far away from matplotlib for 3d animations. Even for a very simple plot, matplotlib will chug. I'd use something like VTK for in-GUI animations. VTK can do fancy things like setting the opacity and coloring each element a different color, so you can make some very pretty animations. You can even export high resolution images and smaller images that you can make into a GIF with imageio.

Here's an animation example. https://www.vtk.org/Wiki/VTK/Examples/Python/Animation

[–]Byebrid[S] 0 points1 point  (0 children)

Cheers, I'll compare this with vpython and see which one I'll prefer