3D graphics programmers using Python?

Brandon Van Every vanevery at 3DProgrammer.com
Tue Feb 4 22:48:37 EST 2003


Brian Quinlan wrote:
>> Python isn't going to give you any advantage in an exceedingly simple
>> problem domain.  Any language would do.
>
> I disagree with this statement. Python has more builtin data types and
> other conveniences, which make working in simple problem domains very
> easy.
>
> As a simple example, I found a simple segment of code from one of my
> OpenGL python programs and converted it to C++. The Python version is
> shorter, simpler and required less thinking to create.

To be honest, I didn't see a big value add in your example.  If you were
doing file loading and text processing problems over and over again, I agree
that Python would have some advantages.  But I don't see any meaningful
advantage for a one-off.  <iostream> isn't the greatest, but it's good
enough for a lot of things.

I did finally run into a 3D graphics problem where Python would have helped.
Currently I need to eneumerate / name all the relationships between poles,
edges, and faces on an icosahedron.  I got tired of making changes by hand,
even though in the real world, I'd be done by now if I'd chosen the manual
labor approach.  Instead I've decided to automate the job so that I never
have to do it again.  This requires a lot of list sorting.  Python's
built-in types would definitely have made this job easier and more cleanly
expressed.  As it is, I don't particularly trust the C++ STL, nor do I care
for template syntax.  So I'm doing everything with fixed length arrays and
double looping Bubble Sorts.  Compared to my usual engineering standards
it's not greatly readable code.  However, it's somewhat readable, and I
don't have time to worry about retooling with Python and integrating it into
my process right now.

I've always thought Python would be better at complex 3D relational problems
and this was one of 'em.  I still don't think Python helps for simple 3D
problems.

--
Cheers,                         www.3DProgrammer.com
Brandon Van Every               Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.





More information about the Python-list mailing list