spring effect in Python

Lie Ryan lie.1296 at gmail.com
Fri Oct 30 13:28:14 CET 2009

pochis40 wrote:
> I'm trying to write in Python something similar to this:
> (Java)
> http://java.sun.com/applets/jdk/1.4/demo/applets/GraphLayout/example1.html
> or these:
> (Proce55ing)
> http://www.cricketschirping.com/processing/ExportAtlas/
> or
> http://www.cricketschirping.com/weblog/2005/12/11/force-directed-graph-layout-with-proce55ing/
> or
> http://www.cricketschirping.com/weblog/2007/02/26/force-directed-graph-layout-with-processing-take-2/
> I've problem to find something that give that physical effect (like a
> spring).
> Any idea?

Use pygame (http://www.pygame.org) for drawing the graphs, lines, and 

Roll your own physics engine. The site you give described how it made 
the physics and you can also look at their java source code (below some 
of the applet there is a download source code link).

More information about the Python-list mailing list