views:

93

answers:

2

Hi,

I am wondering if there are any well-known algorithms that I should be aware of for spacing objects visually.

For instance, a LINQ to SQL diagram has many tables but automatically spaces them for readability. Is this pretty much a "place randomly and move if too close/overlap" type algorithm or is there more to this?

Thanks for any advice!

+3  A: 

Roughly, you can perform a "connectedness" analysis on your graph of objects, to determine which is (are) more central; i.e. which have a higher degree of connectivity to other objects. Those go in the center. Figure out your individual sizing of objects, determine the amount of space left, divide that by the number of items to place, and place them based upon that data.

McWafflestix
+1  A: 

Take a look at GraphViz. It might be usable right off the shelf or might be a good starting point.

BCS