Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link Distance (Read 1326 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Link Distance
Sep 7th, 2011 at 12:08pm
Print Post  
I have 2D diagram
I want to link all node with each other but every link has an accurate distance
How to assign a distance between links?I think I have to move the nodes but if I move one it will affect for the distance to another one as all nodes are related to each others
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link Distance
Reply #1 - Sep 7th, 2011 at 4:49pm
Print Post  
I suppose this can be solved with some trigonometry, see the second point under the Applications section here:
http://en.wikipedia.org/wiki/Law_of_cosines

Note that there might not be a solution at all, say if you have links in a cycle and one of them is longer than the sum total of all others. On the other hand, there might be multiple solutions, e.g. four links of equal length could form a square or rhombus.

If there are multiple faces (closed regions defined by links) in your graph, you will have to solve a system of equations to find a solution.

All in all, if you know these fixed lengths correspond to a shape that actually exists, better use the shape's vertex coordinates to place the nodes, instead of trying to find their positions from the distances.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint