Jump to content
  • Advertisement
Sign in to follow this  
CuppoJava

Looking for a box-fitting algorithm

This topic is 3772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm looking for an algorithm that can solve the following problem, but I don't know what it might be called, so I don't know what to google for. If someone could give me a keyword to search for that'd be great. I have 1000 rectangles of different widths and heights. I have to fit all these smaller rectangles into the smallest size rectangle possible. Thanks a lot -Cuppo

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by CuppoJava
Hi,
I'm looking for an algorithm that can solve the following problem, but I don't know what it might be called, so I don't know what to google for. If someone could give me a keyword to search for that'd be great.

I have 1000 rectangles of different widths and heights.
I have to fit all these smaller rectangles into the smallest size rectangle possible.

Thanks a lot
-Cuppo
Bin packing.

I wrote some code for this a while ago, and would be happy to provide a link to it. However, you'll probably find something better than my simple implementation within five minutes of Googling 'bin packing', so if I were you I'd just start searching and see what comes up.

Share this post


Link to post
Share on other sites
Quote:
Original post by CuppoJava
I have 1000 rectangles of different widths and heights.
I have to fit all these smaller rectangles into the smallest size rectangle possible.
-Cuppo


Try this:
http://www.iguanademos.com/Jare/Articles.php?view=RectPlace

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!