最佳2d bin包装 [英] Optimal 2d bin Packing

查看:101
本文介绍了最佳2d bin包装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在这里要做的是,我有一定的矩形,然后我有一些标准尺寸。我已经阅读了一个适合这些部分的算法最好的矩形并放置它们。我想要一个算法,它告诉我应该在哪张纸上放哪些块或者我应该选择哪些矩形块(因为标准纸张的区域不能只生长一定数量的不适合)补片optimally.Please如果任何人都可以点我出那将是一个很大的帮助正确的方向。

谢谢你。

解决方案
< BLOCKQUOTE>我建议由马特·Perdeck在开始使用此CodeProject上的文章快速优化矩形包装算法构建CSS精灵:的 ^ ]。这篇文章包含了对包装问题的一个很好的概述,并继续开发和改进算法。



Kossovsky Alexander的Nuclex矩形包装算法是,也可能是好的资源,你,你可以看到他们,并下载C#源,在这里:的 ^ ]。



Kossovsky提供三种不同的打包算法。他的代码根据IBM公共许可证授权,并使用Microsoft XNA FrameWork。


Hi Everyone,
What i am trying to do here is that i have a certain no of rectangles and then I have some sheets of standard sizes.I have read an algorithm that fits the pieces into the rectangle and place them optimally.I want an algo that tells me which pieces should go in which sheet OR which rectangle pieces should I select (as the area of the standard sheet can't grow only a certain no of rects can fit) to fill the sheet optimally.Please if anyone can point me out in the right direction that would be of a great help.
THANK YOU.

解决方案

I'd suggest you start with this CodeProject article "Fast Optimizing Rectangle Packing Algorithm for Building CSS Sprites" by Matt Perdeck: [^]. The article contains a good overview of the packing problem, and goes on to develop, and improve, an algorithm.

The "Nuclex" rectangle packing algorithms by Kossovsky Alexander are, also, probably good resources for you, and you can read about them, and download C# source, here: [^].

Kossovsky provides three different packing algorithms. His code is licensed under the IBM Public License, and uses the Microsoft XNA FrameWork.


这篇关于最佳2d bin包装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆