Re: Puzzling with ads on magazine pages (Off Topic ?)
Ahh a classic Operational Research 'Packing' Problem. Comes in many shapes and forms. These problems 'seem' to be quite simple, until you start looking at the options. Take a look at http://arp.anu.edu.au/www/software/piclay/html/piclaydemo.html Which states "Arranging pictures or photographs on a wall or a sheet of paper can be viewed as a layout problem that consists in placing a set of rectangles on a large rectangle so that there are no overlaps, and all edges are parallel to either the vertical or horizontal edge of the large rectangle..." (includes JAVA source code if required). This should give you ideas about how to approach the problem. Otherwise search on 'Operational Research Packing' on the web. You'll find there's no right answer and that everyone else tells you their solution is better/faster/more efficient. Have Fun ! Gary Rathbone - Original Message - From: "Terry Vogelaar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 5:41 AM Subject: Puzzling with ads on magazine pages > I need to make a program that figures out how a couple of rectangles fit > best into a number of larger rects. OK, this sounds too cunfusing. I need to > make a program that fits several advertisements on 12 magazine pages. And I > want Revolution to figure out what ad should be placed where. None of the > ads has a standard width or height. The ads don't need to align, however. As > long as they fit and as long as they don't overlap. > > Challenging, isn't it? > > Any suggestions to get started? > > Terry > http://www.discovery.nl > > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Puzzling with ads on magazine pages
On Thursday, April 11, 2002, at 02:41 , Terry Vogelaar wrote: > I need to make a program that figures out how a couple of rectangles fit > best into a number of larger rects. OK, this sounds too cunfusing. I > need to > make a program that fits several advertisements on 12 magazine pages. > And I > want Revolution to figure out what ad should be placed where. None of > the > ads has a standard width or height. The ads don't need to align, > however. As > long as they fit and as long as they don't overlap. > > Challenging, isn't it? > > Any suggestions to get started? Terry, Yes. You could start with a bin-packing algorithm but that would choose the minimum number of pages and give you a jammed layout on some with little or nothing on others. I do not know how tight the constraints but how about starting by sorting the rectangles (the ads) by size then distributing from largest down across the pages, one per page, then continue iterating across the pages in descending size as long as they fit. At the end, randomise your pages so that as you turn them you are not obviously descending by largest ad size. Alternatively, start with the size-sorted ads and in groups of twelve randomly distribute them one to each page. One of these ought to give a reasonable size balance between any two pages. You can always fiddle at the end for aesthetics once you have a draft layout. Will that get you started? cheers David > > Terry > http://www.discovery.nl > > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Puzzling with ads on magazine pages
I need to make a program that figures out how a couple of rectangles fit best into a number of larger rects. OK, this sounds too cunfusing. I need to make a program that fits several advertisements on 12 magazine pages. And I want Revolution to figure out what ad should be placed where. None of the ads has a standard width or height. The ads don't need to align, however. As long as they fit and as long as they don't overlap. Challenging, isn't it? Any suggestions to get started? Terry http://www.discovery.nl ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution