Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Automatic layout to simulate physical locations when distances are specified (Read 1840 times)
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
Automatic layout to simulate physical locations when distances are specified
Mar 19th, 2013 at 12:41am
Print Post  
Here's another strange question ...

Let's say I have 26 nodes, call them A, B, C ... Z. These represent 26 physical locations. Now if I create links between all of these nodes, that's 325 links, right? These links represent the distance between the physical locations, let's say in meters. Typically, some of the locations are close to each other, so links A-B, A-C, A-D, B-C, B-D, and C-D are approx. 20 - 50 meters each. Same with nodes E, F, G, H, I and J. But these locations are rather far from A, B, C and D, so link A-E is maybe 300 meters.

Now my question. Is there some automatic layout that will position the nodes in a diagram to give a rough representation of these inter-node distances? So nodes A, B, C and D are shown in one cluster and E, F, G, H, I and J in another cluster and so on. But trying to maintain the relative lengths of all of the links?

In addition, if one of the links is specified incorrectly (inconsistent with physical location possibilities), say A-D is by mistake specified as 1 km., then this will become obvious from the result of the automatic layout or otherwise flagged as an error?

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automatic layout to simulate physical locations when distances are specified
Reply #1 - Mar 19th, 2013 at 6:44am
Print Post  
SpringLayout.NodeDistance is multiplied by link.Weight to determine the normal spring length for the link. So you could assign the MeasureUnit amount representing a meter to NodeDistance, assign the meter distances to links' Weight, and apply SpringLayout.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
Re: Automatic layout to simulate physical locations when distances are specified
Reply #2 - Mar 19th, 2013 at 11:36am
Print Post  
I thought the link's influence on SpringLayout was to pull the nodes towards each other. Should I specify the weight as a negative amount?

Thanks for your help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automatic layout to simulate physical locations when distances are specified
Reply #3 - Mar 19th, 2013 at 11:52am
Print Post  
Specify it as a positive one. The simulated forces make the link strive to reach its normal length, so they will either compress or stretch it depending on its length in current iteration.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint