Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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.


In reply to Seeking A Scaling Equation by jthalhammer

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (3)
    As of 2015-11-30 05:00 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (758 votes), past polls