Re: Compose rectangles within another rectangle

Arno Gerretsen <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
Thank you both for the reply. Knowing the exact scientific name makes it 
a lot easier to find more information on this. So thanks for putting me 
in the right direction. I am sure I will be able to find a way that I 
can implement on my tool.

Arno


On 22/01/2010 22:39, Jason Hughes wrote:
> This is called bin packing.  You'll find much research on it, and even
> this very question has been answered a few times in the archives of this
> list.  To save you a few seconds, some folks suggest an approach similar
> to Tetris.  Personally, I sort rectangles by the longest axis and pack
> from longer to shorter, minimizing the distance to the origin of the
> texture sheet when placing them.  That tends to work pretty well.  If
> you can do it offline, slowly shuffling the order you submit the
> rectangles a little bit can get you some good gains over the simple
> sorting method, but it all depends on how much effort you want to put
> into it.
>
> Best of luck,
> JH
>
> Jason Hughes
> President
> Steel Penny Games, Inc.
> Austin, TX
>
>
>
> Arno Gerretsen wrote:
>    
>> Hi,
>>
>> 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.
>>
>> The background is that I want to compose a big texture sheet from a
>> collection of smaller texture pieces automaticaly.
>>
>>
>>      
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> GDAlgorithms-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
>    


-- 
Arno


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.