views:

50

answers:

2

Hello,

I am trying to map all network devices and create a visio file with the resulting network topology.

I was wondering if there are any algorithm for best positioning the nodes on the graph, considering its connections.

Connections are bidirectional, like this (may have many connections between the same nodes):

---------          ---------
|       |          |       |
|   A   |----------|   B   |
|_______|          |_______|
A: 

This is covered in Programming Collective Intelligence by Toby Seagaran. In Chapter 5's examples, socialnetwork.py shows how to draw such a graph by taking things into account like counting crossed lines and how to display a graph by minimizing intersections.

jamesaharvey
+3  A: 

The Wikipedia entry Force-based algorithms is a good start.

Bart Kiers
Thank you. I didn't know where to start.
leandrosa81
@leandrosa81, you're welcome.
Bart Kiers
I really find these algorithms elegant, because of relation to intuitive principles.
Matthieu M.