Drawing Cogwheels and Combinatoric diagrams

Terry Hancock hancock at anansispaceworks.com
Sat Dec 11 01:44:12 EST 2004


On Wednesday 01 December 2004 10:39 am, Andrew James wrote:
> Gentlemen,
> I'm looking for a graphing or drawing python package that will allow me 
> to draw complex geometric shapes. I need to be able to create shapes 
> like cogwheels and Venn diagrams:
> 
> http://encyclopedia.thefreedictionary.com/Venn
> 
> The library must support alpha blending and the ability to return x,y 
> co-ordinates for a shape, as I want to draw an imagemap on top of parts 
> of the shape.
> 
> Can PIL do this, or do I need to go the way of GnuPlot or Gri? Can 
> anyone give me an example of a complex shape drawn like this?

Although I believe PIL can do some of this in principle, it isn't really
designed for it.  You might want to look into Skencil. Although it is
usually regarded as a GUI application, it is also a python vector
graphics package.  See http://skencil.org.

The one thing I think will be a problem is the alpha-blending, as
Skencil either doesn't support it or hasn't for very long (so you'd
need the very latest version).  However, you can, of course, use
PIL to alpha blend graphics after they've been rastorized, which
might work for you.

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list