用于在笛卡尔空间中可视化/动画粒子的 Python 框架
我有表示多个时间步长的粒子位置的数据,并且需要创建一个显示这些粒子运动的动画。
是否有任何框架或工具包(最好是基于 Python 的)可以开箱即用地执行类似的操作,或者至少可以轻松快速绘制精灵/3D 对象并在多个时间步骤中对其进行动画处理?
对于第一阶段,简单的 2D 动画就足够了。不过,我希望可以选择进一步扩展它以支持 3D 和用户交互(更改视图、动画控制、将动画导出到文件等)。
只是为了澄清,我不想渲染一个复杂的场景。类似以下内容即可:
该特定图像是类似数据集的单个帧的屏幕截图。
I have data representing the position of particles for multiple time steps and need to create an animation showing the movement of these particles.
Are there any frameworks or toolkits (ideally Python based) out there does something like this out of the box, or at least something that makes it easy to quickly plot sprites/3d-objects and animate it across multiple time steps?
For the first stage a simple 2D animation is sufficient. However I would like to have the option of extending it further to support 3D and user interaction (changing view, animation control, exporting animation to file, etc).
Just to clarify, I'm not looking to render a complicated scene. Something like the following would do:
This particular image is a screenshot of a single frame for a similar data set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
看看 PyODE。这将有助于物理部分。你只能靠自己来处理图形。
Have a look at PyODE. That will help with the physics part. You're on your own with the graphics.
Pyprocessing 是 处理 Java动画库。处理开发环境包括一些非常好的实现粒子系统的示例。
Pyprocessing is a Python treatment of the processing Java animation library. The processing development environment includes some very nice examples of implementing a particle system.
Side Effects Software 的 Houdini 是一款工业级 3D 动画应用程序,具有出色的 Python 绑定、Python 表达式和一般支持。导入数据很简单,Houdini 甚至在应用程序中提供了一个用于修补的 Python shell。
导入后,您可以利用全套动画和可视化工具以及出色的捆绑渲染器“Mantra”。
有一个免费的“学徒”版本限制很少,并且有各种级别的付费许可证。
Houdini by Side Effects Software is an industry-grade 3D animation application with excellent Python bindings, Python expressions and general support. It would be simple to import your data, and Houdini even has a Python shell within the application for tinkering.
After you've imported it you can take advantage of the full range of animation and visualisation tools and the excellent bundled renderer, "Mantra".
There is a free "apprentice" edition with very few restrictions, and various levels of paid licenses.
我们使用了 pyOGRE,它们是与 OGRE 库的 Python 绑定,其自身描述为:
We've used pyOGRE, which are Python bindings to the OGRE library, which describes itself as:
在 2D 中,为什么不直接使用
matplotlib
来绘制帧的散点图从你的模拟。例如,
您可以从帧中制作视频。
至于 3D - 您可以尝试
matplotlib
的mlab
或mplot3D
。根据我的经验,mlab
上手有点棘手。如果您需要有关使用 matplotlib 的更多帮助,请评论这篇文章。http://www.scipy.org/Cookbook/Matplotlib /mplot3D
http://code.enthought.com/projects/mayavi /docs/development/html/mayavi/mlab.html
In 2D why don't you just use
matplotlib
to do scatter plots of the frames from your simulation.For example
You can then make a video from the frames.
As for 3D - you could try
matplotlib
'smlab
ormplot3D
. From my experiencemlab
is a bit trickier to get going. Comment on this post if you need more help with usingmatplotlib
.http://www.scipy.org/Cookbook/Matplotlib/mplot3D
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab.html