in reply to Challenge: 2D random layout of variable-sized rectangular units.

In your proposed format for the output, you forgot one thing: rectangular paves can be oriented either horizontally or vertically — thus, rotated over 90°.

Unless you prefer all rectangles to be oriented in the same direction?

  • Comment on Re: Challenge: 2D random layout of variable-sized rectangular units.

Replies are listed 'Best First'.
Re^2: Challenge: 2D random layout of variable-sized rectangular units.
by BrowserUk (Patriarch) on Sep 03, 2006 at 19:09 UTC

    The orientation (where it matters Ie. for non-square units), can be derived from the information I listed. If you substract the next unit's X-offset from this unit's X-offset, you have the dimension in the X orientation. Combined with the type letter, this is sufficient.

    But you are right. An indication of orientation would be a useful addition.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.