[Edu-sig] Fun geometry w/ Python's help
Kirby Urner
urnerk@qwest.net
Thu, 14 Mar 2002 23:12:27 -0800
Greetings all --
Just thought I'd share results of a project with other
Pythonistas.
Here's a POV-Ray graphic [1] I generated earlier today
using Python to write the script:
http://www.inetarena.com/~pdx4d/ocn/graphics/w1000.gif
What we're seeing are balls in a cubic close packing (ccp)
out to distance sqrt(1000) from the origin. Color coding
indicates different distances, with orange balls being
at maximum distance.[3]
Source code is here:
http://www.inetarena.com/~pdx4d/ocn/python/ccp.py
Note I'm also importing modules coords.py (a vector
implementation) and povray.py (used to write vectors in
coords to POV-Ray). Both are available at same URL.[2]
Kirby
[1] Re POV-Ray: http://www.povray.org
[2] related info and more graphics at:
http://www.inetarena.com/~pdx4d/ocn/wgraphics.html
[3] background on povray.py and coords.py is at
http://www.inetarena.com/~pdx4d/ocn/numeracy0.html ff