perlquestion
jthalhammer
<p>
This has more to do with math than Perl, but there is a connection...
</p>
<p>
I'm trying to figure out an equation for scaling the dependency graphs on Stratopan such as the one seen <a href="https://www.facebook.com/photo.php?fbid=166347500200245&set=a.166347390200256.1073741825.151853071649688&type=1&theater">here</a>. 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.
</p>
<p>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.
</p>
<p>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.</p>
<p>
Thanks for your time.
</p>
<p>
-Jeff
</p>