Need Help With Physics - Direct Graph Visualizer - Silverlight

Oct 26, 2010 at 5:34 PM
Edited Oct 26, 2010 at 5:35 PM

Hi,

I am not Graphics developer and I need little help with implementing my requirements.

I would like to describe my problem first:

I need to create directed graph visualizer in Silverlight, it would be something like Mind Map software e.x. http://www.xmind.net/ 

My Proof of Concept application requirements:
1. I have canvas that is not full screen canvas but only one region on the whole Silverlight application.
2. This canvas must draw directed graph from underlying Graph implementation Graph<T> I used msdn implementation http://msdn.microsoft.com/en-us/library/ms379574(VS.80).aspx
3. For the simplicity of my PoC application I will draw only rectangles as my graph nodes and lines with arrow as my graph edges.
4. The whole Canvas should be something like a window of computer game.
5. I need functionality like zooming and scrolling my "space" in my canvas.
6. My space needs central point of origin, 0.0 like coordinate system x=0, y=0.
7. At the center of my point of origin 0,0 i need to create physic force that will magnetize the whole graph (all the nodes) to the center (important).
8. All nodes show be magnetized with each other by negative number which means that they would keep distance and not overlap /stick to each other (important).
9. Above 7 and 8 means that forces need to be balanced and create canvas 0.0 centralized graph with well distributed nodes that maintain minimal distance from each other.
10. All edges (lines with arrows) should change their width dynamically and keep anchors (beginning - source rectangle's center of gravity and end - destination rectangle's center of gravity).

All above will be done LATER from code, programmatically.

But right now i need help to make it simple as possible.
It can be done whole as XAML for the beginning using behaviors and predefined rectangles.
I don't need help right now in dynamically generating rectangles from nodes.
I need help with physics and Canvas as a zoomable and scrollable "window".

I would appreciate any help.

Regards,
Daniel Skowroński