Probably this is not what you are looking for but: If your maximum square count is relatively low then you could use some kind of brute-force technique where you could "try" different cases. This might be the only way if the "squares" are actually "rectangles" (i.e. images) with varying ratios: that way, each line could have a different "height" to maximize the screen space. But that's probably OT... :)
My 0.02 $ B. 2006/5/8, Mike Mountain <[EMAIL PROTECTED]>:
All my squares need to be the same size - so for example what's the best way of laying out 'n' equal squares in an areas x,y so the squares are as big as they can be. There must be an algo for this kind of thing. M > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Kerem Gülensoy > Sent: 08 May 2006 13:59 > To: 'Flashcoders mailing list' > Subject: AW: [Flashcoders] Fitting squares into an area > > you could divide the area, divide one half again, divide the > other half, and so on...n-times... > > cheers | kerem > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Im Auftrag > von Mike Mountain > Gesendet: Montag, 8. Mai 2006 14:51 > An: Flashcoders mailing list > Betreff: [Flashcoders] Fitting squares into an area > > Anyone got any script to cover the following problem: > Given an area (x,y) what's the best way of filling it with > 'n' squares? > Cheers > M _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

