I am creating a graph interface with different nodes and a selected node at the center. I created the center node and I drew a circle to mark the location around which the subnodes will be placed.
I wanted to place many nodes in the circumference of the circle without each overlapping other. How do I find exactly how many can be placed in circumference?
Each of my subnode views will have the same size. But irrespective of that, the arcLength occupied by each of the sub nodes in circumference of circle is different .
How do I find the total no of controls with a certain size that are possible to be placed in a circle's circumference with a particular radius . And how do I find the center point of each subnodes to be placed in circle's circumference.
I know that we can use the below formulas to find the angle to traverse to place the subnodes. The problem here is the arcLength is not fixed for each subnode view.
2PirC/360 = arcLength x = cx + r * cos(a) y = cy + r * sin(a)