高效填料算法正多边形 [英] Efficient Packing Algorithm for Regular Polygons

查看:140
本文介绍了高效填料算法正多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

http://content.screencast.com/users/Tom/folders/Jing/media/04cb9283-7fc0-4ccd-99ad-a4e056f81b23/2010-06-21_0056.png

这篇关于高效填料算法正多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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