python 3D可视化和图形 [英] python 3D visualization and graphics

查看:39
本文介绍了python 3D可视化和图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找与 Python 兼容的 3D 图形.大多数情况下,我希望能够绘制线条并以 3D 方式查看它们.我确实没有这方面的经验,正在寻找知识和教程.

I am looking for Python compatible 3D graphics. Mostly I would like to be able to draw lines and view them in 3D. I literally have no experience in this area and am looking for knowledge and tutorials.

我通过实验来最好地学习编程.那么我需要哪些包来做 3-D 图形呢?我真的很喜欢使用 emacs,所以如果你也有这些建议那就太棒了!

I learn programming best by experimentation. So which packages do I need to do 3-D graphics? I really enjoy using emacs, so if you have those suggestions as well that would be awesome!

总结:

  1. python 中的 3D 图形需要哪些包.
  2. 请注意,我使用的是 Ubuntu 12.04 LTS 和 emacs 24.3

推荐答案

对于 3D 图表和图形(编辑)

如果您只需要绘制 3D 图形并定期更新它,gnuplot 可能是合适的.使用 Python 的 子进程库,您可以在进程中生成它以生成图形,使用多种输出格式,例如 SVG 或 PNG.

For 3D charts and graphs (Edit)

If you just need to draw a 3D graph and periodically update it, gnuplot may be appropriate. Using Python's subprocess library you can spawn it in a process to produce graphs, with a variety of output formats, such as SVG or PNG.

另请参阅下面汤姆的回答,以获取替代图书馆的建议.

Also see Tom's answer below for an alternative library recommendation.

这个答案是为那些对实时图形感兴趣的人准备的.

This answer is for those who are interested in realtime graphics.

渲染 3D 图形的标准方法是使用与 GPU 接口的 OpenGL 库.OpenGL 是一个很大的话题,但专注于特定的应用程序,比如绘制 3D 线应该不会太难.

The standard way to render 3D graphics is with the OpenGL library which interfaces with the GPU. OpenGL is a big topic, but focusing on a specific application, like drawing 3D lines should not be too difficult.

python 存在绑定http://pyopengl.sourceforge.net/

Bindings exist for python http://pyopengl.sourceforge.net/

GLUT - 可能是提供 X 平台窗口和上下文设置的最佳选择,并且包含在上述绑定中.

GLUT - is probably the best for providing X platform windowing and context setup, and is included in the mentioned bindings.

OpenGL - 使用 Opengl 有两种主要方式,一种是传统"的风格和现代"一.对于简单的应用程序,遗留系统通常更容易上手,但学习现代技术是更好的长期投资.

OpenGL - there are two main ways to use Opengl, a "legacy" style, and a "modern" one. For simple applications legacy is often easier to get started, although learning modern is a better long-term investment.

这里有一些学习链接 - 不要觉得有必要阅读所有链接 - 选择与您相关的主题.

Here are some links for learning - Don't feel obligated to read them all - pick the topics that are relevant to you.

这篇关于python 3D可视化和图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆