[Python Wpg] Cannot figure out this ZeroDivisionError exception
Kevin Veroneau
kveroneau at gmail.com
Thu Mar 10 17:33:41 EST 2011
Hello,
I am in the process of learning the basics of 3D math and programming, and
thought using Python and Pygame would be a good choice to prototype in. The
2D example works great, the isometric 3D example also works. But in the 3rd
example, when I press Space to enter into full 3D, it uses a flow control
statement to change a calculation. Even though the calculation is very
similar in both isometric and full 3D, it just does not work and I am very
confused why.
You can view the source code online in my public Subversion Repository:
http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat
I am following the tutorial step-by-step on this website:
http://skytopia.com/project/cube/cube.html
That website explains 3D using pseudo-code, the author made it resemble
BASIC-like syntax for clarity. As I read through the tutorial, I coded it
in Python, and thus is why there is three python files, one for each phase
of the example.
I thought I would ask here, as I noticed many of you on this mailing list
using Python for mathematical purposes, and this exception is related to a
math operation in a calculation. This is my first time going in depth with
3D programming and how the math behind it works. I would of course move to
OpenGL once I understand the fundamentals.
On the topic of OpenGL, which OpenGL Python library would you recommend
someone who is just diving into GL. I feel my Python skills are pretty
strong at this point. I understand that Blender can be scripted using
Python, would this be a good place to start or should I use a stand-alone
python module?
Thanks,
Kevin Veroneau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/winnipeg/attachments/20110310/df9aced1/attachment.html>
More information about the Winnipeg
mailing list