On Fri, Jan 22, 2010 at 2:18 PM, Arno Gerretsen <arno@agerrius.nl> wrote:
I am looking for an algorithm that can help me to compose a number of
rectangles, with different sizes, within a bigger rectangle. So I want
to pack them most efficiently within the bigger rectangle. Does anybody
know the best approach to this, except for just trial and error.

This might be useful...

http://www.blackpawn.com/texts/lightmaps/default.html