[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Perspective distortion



Hello everyone,

This may not be the right forum for asking this question, but since my
project is mainly pygame based, I'll take a chance.  ;)

What I'd like to know is whether there is a Python module or example which
will take a 2D bitmap and do a perspective tranformation so that it appears
you are looking along its surface as in a 3D first person perspective game.
I've had a look at pygame itself and there doesn't seem to be anything that
goes that far.

I realise that the simplest way of doing this is to use OpenGL and use the
bitmap as a texture, but I'd like to avoid OpenGL if possible. Similarly, I
know there are graphics packages that will do this operation, but it has to
be done at run-time as the bitmap is dynamically generated. As you can see,
I'm looking for a relatively low-tech solution. I could write the code to do
this myself, but I'm a firm believer in not re-inventing the wheel.

So the question is: does anyone know where such a wheel can be found, or
have I got to add something else to my "to do" schedule.

Thanks for your forebearance,

Bill Hoggett