//Copyright 2005 Sean McCullough //banksean at yahoo int H = 500; int W = 500; Graph g = buildRandomGraph();; float scaleFactor = 1; void setup() { size(500,500); framerate(20); smooth(); } void draw() { background(0); if (g != null) { doLayout(); g.draw(); } } void doLayout() { //calculate forces on each node //calculate spring forces on each node for (int i=0; i