From: "Hal E. Fulton" Date: 2003-05-04T11:04:24+09:00 Subject: Re: "Collage" of images -- more pychological randomness ----- Original Message ----- From: "Daniel Carrera" To: "ruby-talk ML" Sent: Saturday, May 03, 2003 8:54 PM Subject: Re: "Collage" of images -- more pychological randomness > The problem you wrote seems fairly specific -- you gave the size of the > grid and images. Are you interested in the specific solution for this > problem, or a generic solution for generic grids and generic image sizes? I'm flexible. Two things I'd be interested in: 1. Better algorithm or coding idioms 2. A more general solution > Is there any reason why you want the position of the 4x4 image randomized? > Why can't it be (0,0) every time? The whole point (in my mind) is to generate a "random-looking" collage that will be pleasing to the eye. The randomness should be apparent both in space and time (e.g., suppose the collage is re-generated every day). One constraint I wouldn't necessarily want to lose is the squareness of the images. That's a big simplifying assumption. To allow images of arbitrary shapes might lead to a much more sophisticated problem. As for the hardcoding of the numbers of images of various sizes: I just wanted a distribution such that 1. The larger the image, the fewer of that size; 2. The curve should be fairly "smooth" Does that make my thoughts more clear? Or less? :) Cheers, Hal