in reply to help with nesting

Try looking up a few algorithms or talking to a Math professor. This is a solved problem with some very neat solutions.

Of course, you could always brute-force it, trying all combinations and picking the one that takes the least area. I might take a stab at this later ...

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re^2: help with nesting
by Aristotle (Chancellor) on Oct 01, 2003 at 14:09 UTC
    Hint for brute force optimization: arrange the pieces with the largest extents in either direction first. Also, for geek karma, try to do it using the regex engine, Abigail style. :)

    Makeshifts last the longest.