Sign in to follow this  
CuppoJava

Looking for a box-fitting algorithm

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this