I want to draw a map some cities in a software that I am designing. I want to know the algorithm for placement of circular nodes on screen (so they dont overlap each other) Please explain in relation to JAVA GUI programming if possible
views:
364answers:
3
+1
A:
Two circles don't overlap, if the sum of their two radii (radius) is less than the distance between their two centres.
- Place a circle A at point P1 with radius R1
- Place a circle B at point P2
- Calculate the distance D between P1 and P2
- The circles won't overlap of the radius of B is less than D minus R1.
ChrisW
2009-09-07 06:17:31
A:
Sorry for posting this question. A similar question has already been answered The links are:
http://stackoverflow.com/questions/69275/drawing-a-web-graph
avd
2009-09-07 06:19:44
I take it that you want this question deleted.
ChrisW
2009-09-07 06:21:18
No please dont remove the question. I have edited the question. Now my question is different
avd
2009-09-07 06:30:11