|laziness, impatience, and hubris|
Seeking A Scaling Equationby jthalhammer (Friar)
|on Jul 25, 2013 at 16:41 UTC||Need Help??|
jthalhammer has asked for the
wisdom of the Perl Monks concerning the following question:
This has more to do with math than Perl, but there is a connection...
I'm trying to figure out an equation for scaling the dependency graphs on Stratopan such as the one seen here. I need to compute the inner and outer radius (in pixels) of the graph based on the number of nodes. As the number of nodes increases, the inner and outer radius need to be larger to accommodate them all.
Also, suppose I want to impose some boundaries. As the number of nodes approaches 200, the outer radius must asymptotically reach 600 to fit on a typical screen. At the same time, the inner radius must asymptotically reach about 200 (so the nodes are not too close together). Going in the other direction, The outer radius must not get any smaller than about 300 and the inner radius must not get any smaller than about 100. There could be 1 or 1000 nodes, but the dimensions must stay within those boundaries.
So that is the basic problem. I looked into using a logarithm, but it has been a long time since I sat in a math class so I couldn't figure out how to apply them. I can figure out how to tune the constants if you can point me in the right direction.
Thanks for your time.