[Edu-sig] Python, Art and Math

Kirby Urner pdx4d@teleport.com
Tue, 09 Jan 2001 10:02:32 -0800


As you would see if you popped up my one Jan 8 post to
this 'Trigonometry' thead on math-teach...

http://www.mathforum.com/epigone/math-teach/salfalblel

... I list a book 'Connections' by Jay Kappraff as highly
worthwhile.  The subtitle of that book is 'The Geometric
Bridge Between Art and Science'.

Just as math and music have many intimate connections (some
of which Jay explores in that book), so do math and the
visual arts.  

As long time posters to this list well know, I'm a big fan 
of the Python + Povray synergy (not to the exclusion of other 
combos).  Povray is used by visual artists to do fancy 
ray tracings.  It's downloadable for free and a longtime
favorite of the ray tracing crowd.

I've recently added a 3rd software tool to the mix:  Qhull.

Qhull is written in C (as is Povray) and the way I interact with 
it is through invoking the same command in Python that I'd 
manually type in a DOS box in Windows, e.g.

 comm = "g:\qhull\qhull < g:\python20\waterman.txt o > qwater.txt"
 os.system(comm)

(this could be tweeked for Linux).  The result is a text file 
(qwater.txt) which I then read into Python using readlines(), 
and parse.  

Qhull does some rather complicated math to figure out what 
geometric shape most tighthly "shrink wraps" all the vertices 
you give it.  It does other stuff too, but that's what I'm 
using it for.  It's a free download.

The game I'm playing is:  the vertices all have to be equidistant 
from a common center.  And (even more restrictive):  the 
vertices, and the common center, all have to be at the centers 
of spheres in what we call a "cube centric packing" (ccp) or, 
equivalently, "face centered cubic" packing (fcc), or 
(Bucky Fuller) an "isotropic vector matrix" (ivm).

Basically, it's the packing you get when you stack oranges at
a grocery store, or cannon balls at a war museum.  Here's an
article about this packing (shows oranges) from the BBC website:

http://news.bbc.co.uk/hi/english/sci/tech/newsid_148000/148645.stm

The results are very interesting.  Here's where math meets art
through geometry.  I encourage tourism (really, these are pretty
-- especially on the pages marked with an asterisk):

   http://www.inetarena.com/~pdx4d/ocn/wgraphics.html
   http://www.inetarena.com/~pdx4d/ocn/wgraphics1.html *
   http://www.inetarena.com/~pdx4d/ocn/wgraphics2.html 
   http://www.inetarena.com/~pdx4d/ocn/wgraphics3.html *

Kirby