高效填料算法正多边形正多边形、高效、填料、算法

由网友(坑蒙拐骗样样精通)分享简介:我正在寻找一个包装算法,这将减少正多边形成矩形和直角三角形。该算法应尝试使用尽可能少的这样的形状尽可能与应该是比较容易实现(给出的挑战的难度)。I'm looking for a packing algorithm which will reduce a regular polygon into rectangles...

我正在寻找一个包装算法,这将减少正多边形成矩形和直角三角形。该算法应尝试使用尽可能少的这样的形状尽可能与应该是比较容易实现(给出的挑战的难度)。

I'm looking for a packing algorithm which will reduce a regular polygon into rectangles and right triangles. The algorithm should attempt to use as few such shapes as possible and should be relatively easy to implement (given the difficulty of the challenge).

如果可能的话,这个问题的答案应该解释建议的算法中使用的一般的启发。

If possible, the answer to this question should explain the general heuristics used in the suggested algorithm.

推荐答案

我想答案是很简单的常规的多边形。

I think the answer is fairly simple for regular polygons.

查找对称轴,并绘制各顶点和其反射镜之间的线。这把多边形成梯形。每个梯形可以变成一个矩形和两个直角三角形。

Find an axis of symmetry, and draw a line between each vertex and its mirror. This divides the polygon into trapezoids. Each trapezoid can be turned into a rectangle and two right triangles.

阅读全文

相关推荐

最新文章