Cyrille Rossant

Making PyQt4, PySide and IPython work together

2012-09-20

PyQt and PySide are two independent Python libraries allowing access to the Qt framework. PyQt is maintained by the British firm Riverbank Computing, whereas PySide is developed by Qt developers from Nokia. PySide was created by Nokia in 2009 after they "failed to reach an agreement with PyQt developers to change its licensing terms to include LGPL as an alternative license" (quoting Wikipedia). Fortunately, the two APIs are very similar (which is not that surprising given that they are just bindings to the same Qt library).


A tutorial on OpenGL/OpenCL interoperability in Python

2012-09-18

In the last two posts, I've shown how to use OpenCL for GPGPU, and OpenGL for graphics rendering, with Python. Here I'll show how both OpenCL and OpenGL can be used at the same time with Python. It's called OpenCL-OpenGL interoperability. What is it about?


2D graphics rendering tutorial with PyOpenGL

2012-09-17

UPDATE: you may be interested in the Vispy library, which provides easier and more Pythonic access to OpenGL.

OpenGL is a widely used open and cross-platform library for real-time 3D graphics, developed more than twenty years ago. It provides a low-level API that allows the developer to access the graphics hardware in an uniform way. It is the platform of choice when developing complex 2D or 3D applications that require hardware acceleration and that need to work on different platforms. It can be used in a number of languages including C/C++, C#, Java, Objective-C (used in iPhone and iPad games), Python, etc. In this article, I'll show how OpenGL can be used with Python (thanks to the PyOpenGL library) to efficiently render 2D graphics.


A PyOpenCL tutorial on Windows with or without a GPU

2012-09-16

I've been using CUDA and PyCUDA as GPGPU platforms for a few years now. They enable access to the incredible computational power of graphics cards through a simple C-like language. A recent Nvidia graphics card is nevertheless required in order to execute CUDA code. Some computers may not include a Nvidia GPU, but rather an AMD/ATI card or even an integrated graphics processor. Those computers thus cannot execute a CUDA program.


A mathematical proof that our world is in three dimensions

2012-08-19

Everyone knows that our world is three-dimensional. It seems indeed obvious that there are three independent spatial directions, no less, no more. But can we really be sure? After all, everything we know about our world comes from our senses and from what our brains interprete. Does the fact that we see in 3D really proves that the world is in 3D? Can we have a mathematical proof, based on experimental observations, that the world is three-dimensional? This question is totally relevant, and several scientists and philosophers, like Immanuel Kant, have been interested in it (see for example this blog post in French for a nice review).