Hi, I'm a hobbyist programmer and need an algorithm for finding a best fit for laying out a grid of graphics objects (square pictures with captions) in a given rectangle or in a given range between X1 and X2. User defined input: imageCount imageMinSide, imageMaxSide gutterMin, gutterMax X1 & X2 or areaWidth & areaHeight
Computed output: columnCount, rowCount, gutter Obviously, some input data may yield this not solvable, such as when user defines imageMinSide smaller than the width of target area. The algorithm should collect satisfying results and return the one with the largest number of fitting objects = least area waste. I'd need help in: 1) properly classifying/naming the algorithm, so that I can make a further search on the net or 2) approaching the task. Currently I've given a try to a classic try- and-error loop with attempt limit, nudging the values up or down depending on the result, but I can smell this is not the way to go. The programming language that you could help me is not as important as the very idea approach. thanks for any hints moonlight --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---