views:

51

answers:

2

I've got an an application wherein I will be provided with an unordered collection of items (objects that can basically be represented as rectangles) and need to put them into a larger rectangular shape (a cluster) based off of their physical location. There may be more than one cluster of items, and some items may be in a cluster by themselves.

Each item knows which item is to its right (if any) and which item is below it (if any). Thus the items could be placed in a Directed Graph and traversed.

How can I display all of the items graphically? If I put the items in a Graph, how should I traverse it?

+1  A: 

This sounds like a good use case for the PR QuadTree: http://www.codeproject.com/KB/recipes/QuadTree.aspx

Travis J Webb
From playing with the QuadTree, it doesn't seem to match my application, but it is a good link and is new subject matter to me.
Pat
A: 

Well, the best solution I've come up with so far is to use the GraphSharp library, although I haven't yet figured out how to customize the look of the Vertices (items) in the graph.

Pat