Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by bart (Canon)
on Sep 03, 2006 at 18:30 UTC ( [id://570952]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found