Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramView3D with SpringLayout (Read 1105 times)
Aziz ur Rahman
YaBB Newbies
*
Offline



Posts: 43
Joined: Feb 23rd, 2009
DiagramView3D with SpringLayout
Jun 8th, 2011 at 4:51pm
Print Post  
Hi,
I have used the sample provided showing how to use spring layout with DiagramView3D. In the sample lots of nodes and links have been created and it is working fine. Point to be noted that nearly all of them are linked together.

In my case I have few nodes (avg 20) which can consists of separated graphs. Now when i apply the same spring layout code, the graph of connected nodes are very close. I want to keep them separated. I tried different properties of the layout but nothing work well.

Please have a look at the picture and suggest.

[IMG]http://i55.tinypic.com/1zoj7ud.png[/IMG]
  

Syed Aziz ur Rahman
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView3D with SpringLayout
Reply #1 - Jun 9th, 2011 at 6:13am
Print Post  
Hi,

The 3D version distributes nodes no worse than the 2D one, but uniform distribution in 3D space does not guarantee that the subgraphs will look separated in a 2D projection, even if nodes from a subgraph were not getting into the bounding sphere of another subgraph.

I suppose you can avoid both overlapping of subgraph bounds and ensure they are separated in the 2D projection by arranging the full graph in two passes. In the first pass arrange each component on its own in 3D, measure the size of its bounding sphere, and create a virtual node of the same size in a temporary diagram. Then arrange the temporary diagram in 2D, and offset the original subgraphs to the positions of the virtual nodes that represent them.

You could use 3D layouts in both passes if you don't care about separating the subgraphs in a 2D projection, but only need to avoid overlap of their bounding spheres in 3D.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint