如何使用 python 创建一个在 Linux 下具有很酷的动画/效果的 GUI 应用程序(例如 Cooliris 中的 3D 墙、compiz 效果等...)
我不确定我的问题标题对您是否有意义。我看到许多很酷的应用程序都有很酷的动画/效果。我想学习如何在 Linux 下使用 python 创建此类 GUI 应用程序。
“酷动画/效果”,例如 Cooliris 中的 3D 墙,它是用 flash 编写的,并使用 opengl 进行 compiz 效果。
我还听说过一些 python GUI 库,如 wxPython 和 pyQT。由于我对 python GUI 编程完全陌生,谁能建议我从哪里开始以及我应该学习什么来实现和创建这样的应用程序?也许学习带有 openGL 功能的 pyQT? pyopengl 绑定?我不知道从哪里开始。非常感谢您的时间和建议。
顺便说一句,如果有人需要知道我要创建哪种类型的应用程序,那么可以是任何类型的应用程序。也许是带有 3D 墙的照片浏览器,也许是 IM 客户端,也许是 facebook 客户端等等...
I am not sure if my question title makes sense to you or not. I am seeing many cool applications which have cool animations/effects. I would like to learn how to use python to create this kind of GUI applications under Linux.
"cool animation/effects" like 3D wall in Cooliris which is written in flash and compiz effects with opengl.
I also heard of some python GUI library like wxPython and pyQT. Since I am completely new to python GUI programming, can anyone suggest me where to start and what I should learn to achieve and create such application? maybe learn pyQT with openGL feature? pyopengl binding? I have no clue on where to start. thank you very much for your time and suggestion.
By the way, in case if someone need to know which kind of application I am going to create, well, just any kind of applications. maybe photo explorer with 3D wall, maybe IM client, maybe facebook client etc...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://techbase.kde.org/Development/Languages/Python
许多 KDE 样式使用 SVG 和大量动画。用户可以随时更改主题。我认为你应该更具体地说明你想要做什么样的动画。我不认为 3D 墙类型影响真正属于 QT 所属的小部件类别。在我看来,您想为应用程序制作 3D 界面。如果是这种情况,您可能需要更多地了解主要在游戏中使用的 3D 引擎类型库。我知道有些有出色的 GUI 小部件,用于编程游戏菜单等。我想你会决定你的引擎并看看是否有 python 语言绑定。我最喜欢的引擎之一: http://irrlicht.sourceforge.net/links.html
另一个您需要考虑的是您希望如何处理窗口管理。你想制作全屏界面吗?还是要开窗?另外,这样的应用程序如何集成到 3D 窗口管理器或者具有合成功能的窗口管理器中。
编辑:
在这种情况下,qtopengl模块可能需要研究一下: http://doc .qt.nokia.com/4.6/qtopengl.html
我推荐 QT。它干净、易于使用并且跨平台。所以你的应用程序也可以在 Windows 上运行。
您需要事先考虑的一件事是您想要执行的 FX 类型。例如,如果您想在重命名图像时创建页面卷曲类型效果,则必须考虑如何对其进行编程,或者寻找执行该数学运算的库/代码片段。游戏中使用的 3D 引擎通常对您在游戏中看到的典型 FX 或动画提供大量支持。如果您使用像 qtopengl 这样的东西,您也需要考虑这一点。 qtopengl 几乎只能渲染。将其视为视口。然而,这是制作桌面 3D 应用程序的正确方法。
编写 3D 应用程序确实很有趣。我很喜欢它。但是,不要对数学感到气馁。如果你是认真的,我建议你买一本关于它的书。我喜欢这个:http://www.amazon.com/Primer-Graphics-Development -Wordware-Library/dp/1556229119
但是,IIRC 的示例是 C++,您可能不习惯。当您理解这些数学概念时,就可以更轻松地思考如何使卷页类型产生影响。当然,如果您找到可以展示如何进行数学计算的库或代码,那就没问题了。
http://techbase.kde.org/Development/Languages/Python
Many KDE styles use SVG and plenty of animation. The user can always change themes. I think you should be more specific about what kind of animations you want to do. I don't think 3D wall type affects really fall into the widget category that QT is. It sounds to me like you want to make a 3D interface for an application. If that is the case, you may want to look more into 3D engine type libraries used mainly in games. I know that some have excellent GUI widgets for programming game menus and the like. I guess you'd decide on your engine and the see if there are python language bindings. One of my favorite engines: http://irrlicht.sourceforge.net/links.html
Another thing you would want to consider is how you want to handle the window management. Do you want to make a full screen interface? Or is to to be windowed? Also how would such an application integrate into a 3D window manager or rather a window manager with compositing.
Edit:
In that case the qtopengl module is probably something to look into: http://doc.qt.nokia.com/4.6/qtopengl.html
I do recommend QT. It's clean and easy to use and cross platform. So your app could run on windows as well.
One thing you'd want to think about before hand is the type of FX you want to perform. For example, if you want to create a page curl type effect when renaming the image, you'd have to think about how to program that, or look for libraries/code snipets that do that math. 3D engines that are used in games often have a lot of support for those kind of typical FX or animations that you'd see in a game. If you use something like qtopengl, you'd need to think about this as well. qtopengl can pretty much only render. Think of it as a viewport. However, it is the correct approach to making a 3D application for the desktop.
Programming 3D applications is really interesting and fun. I enjoyed it a lot. However, don't get discouraged be the math. I recommend getting a book about it if you are serious. I liked this one: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119
However, IIRC the examples are C++ which you may not be comfortable with. When you understand such mathematical concepts, it easier to think about how you would make a page curl type affect. Of course, if you find libraries or code that shows you how to do the math, that may be fine.
也许,只要创建一个 GUI,所有效果都会变得 compiz?
不管怎样,据我所知QT有能力使用openGL。
http://doc.qt.nokia.com/4.1/examples。 html#opengl-examples
May be, just create a GUI and all effects will make compiz?
Anyway, as I know QT have ability to use openGL.
http://doc.qt.nokia.com/4.1/examples.html#opengl-examples