我一直在研究的方法与 Belisarius 非常相似,所以我只会分享一些关于我的想法的注释(我正在使用 Mathematica)。
- 可以放置切割的边对的数量是顶点数量的二次方 (1/2 n (n-1) ):(线通过连接每对的起始顶点来标记边对)
黄色区域标记了可以找到切口的区域:
因此,在对所有组合进行大量计算之前,最好删除无效的候选者。下面显示了一些面积比剩下的对:
- As belisarius says you can find the range of area ratios for each of the above situations, but simply taking the Min and Max is incorrect. The two ranges you get when you reverse the two areas in your area ratio maybe disjunct. I use Mathematica's Interval
arithmetic to handle this for me:
检查给定的面积比是否也可以使用舒适的 Interval 函数来处理:
containsRatioQ[area1_, area2_, areaBetween_, ratio_] :=
IntervalMemberQ[areaRatioInterval[area1, area2, areaBetween], ratio]
-
参数 lambda 的值,确定第一条边的切割位置,作为 mu 的函数(确定第二条边位置的参数)
\[Lambda] -> (2*aL + givenAreaRatio*(-2*
aR + (p1y - p3y)*(p2x - p4x) - (p1x - p3x)*(p2y - p4y)) + (1 +
givenAreaRatio)*(p1x*p3y - p3y*p4x + p1y*(-p3x + p4x) -
p1x*p4y + p3x*p4y)*\[Mu])/
((1 + givenAreaRatio)*((-p2x)*p4y +
p1x*(-p2y + p4y) + (p1x - p2x)*(p3y - p4y)*\[Mu] +
p1y*(p2x + p4x*(-1 + \[Mu]) - p3x*\[Mu]) +
p2y*(p4x + p3x*\[Mu] - p4x*\[Mu])))
或 mu 作为 Labda 的函数:
\[Mu] -> (-2*aL + givenAreaRatio*(2*
aR - (p1y - p3y)*(p2x - p4x) + (p1x - p3x)*(p2y - p4y)) + (1 +
givenAreaRatio)*((-p1x)*p2y + p1y*(p2x - p4x) + p2y*p4x +
p1x*p4y - p2x*p4y)*\[Lambda])/
((1 + givenAreaRatio)*((-p3y)*p4x + p3x*p4y +
p1y*(p3x - p4x)*(-1 + \[Lambda]) -
p1x*(p3y - p4y)*(-1 + \[Lambda]) + ((-p2y)*p3x + p2x*p3y +
p2y*p4x - p2x*p4y)*\[Lambda]))
其中 p1、p2、p3、p4 是包含切口的区域的坐标,aL 是“绿色”多边形的区域,aR 是“红色”多边形的区域(参见本文底部的图)。
并非一条边上的每个点总是在另一条边上给出解决方案,反之亦然。我检查 lambda 方程以找到将 lambda 设置为 0 或 1 的 mu 值,反之亦然。
-
作为最后一步,我最小化两个区域的纵横比函数的最大值。用 Mathematica 语言来说:
NMinimize[{Max[aspectRatio[area1tot], aspectRatio[area2tot]], \[Mu]range[[1]] <= \[Mu] <= \[Mu]range[[2]]}, \[Mu]]
其中are1tot和area2tot是由mu和lambda参数化的两半的总面积,其中lambda被上述以mu表示的lambda方程所取代。现在我们只剩下一个参数了
- 以下是面积比为 1 的最小化过程的结果。绿色曲线是绿色多边形的长宽比(+ 取决于 mu 的附加面积),红色曲线是红色多边形的长宽比(+ 附加面积)取决于亩)。
我有一本 Mathematica 笔记本,我会根据要求发送给您。只需给我发一封电子邮件即可。