19/5/2007

force directed graph

This is something I decided to do when I realised I had access to an interesting database of the interrelationships between a whole load of Livejournal users.

Technical info, if anyone cares:
I cheated to make the layout work well - the real data is too interconnected to produce a visually pleasing result, so instead I turned the input graph into a spanning tree, and then added back most of the reciporical connections to make it a bit more interesting. Which means an awful lot of connections are missing from the graph.
2500 was about the limit of number of nodes that I could compute without leaving my computer overnight.
The 3d layout is a pretty basic force-directed iterative function. Start with every node at a random position. Edges act like springs, nodes slightly repel each other. Repeat until it stabilises.
Rendering was done with POV-Ray. I love POV-Ray.
I'd like to try playing around the parabolic projections for the layout instead, I think they're prettier.

High quality .png version here