povray.py

Mordy Ovits movits at lockstar.com
Fri Apr 9 12:07:30 EDT 1999


Quinn Dunkan wrote:
> Well, I don't have RenderMan, but I did write a pov.py module.  It does
> basically what you described, and eventually I'm going to add animation
> features and basic physics (the ocaml module I wrote before did that) and
> stuff like "magic" transforms that align one object with another, spline
> curves etc.  I've designed some scenes in it, and it's wordier than pov, but
> has all the benefits of a real language.  It doesn't do the new halo syntax
> because the pov people have yet to release an updated unix version
> (grumblegripegrunt).  It's incomplete, and written when I was first learning
> python, and I haven't worked on it for a while, but I'll send it to anyone
> interested.  Perhaps we could collaborate?

I'd like a copy of your pov.py module, please.  I'm an experienced Python
programmer, and raytracing hobbyist.  If I made any additions to it, I'd gladly
send them along to you.
Thanks!
Mordy
-- 
o Mordy Ovits
o Cryptographic Engineer
o LockStar Inc.
---------------------------------------------------------------------------
#!/usr/local/bin/python 
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))




More information about the Python-list mailing list