兰州人 发表于 2008-8-29 22:26:00

正六形形顶点坐标

本帖最后由 作者 于 2008-8-30 13:51:54 编辑 <br /><br /> <p></p><p>&nbsp; s = 10<br/>&nbsp; Hexagon(0) = Array(s / 2 * Tan(30 * 3.1415926 / 180), s / 2)<br/>&nbsp; Hexagon(1) = Array(-s / 2 * Tan(30 * 3.1415926 / 180), s / 2)<br/>&nbsp; Hexagon(2) = Array(-s * Tan(30 * 3.1415926 / 180), pp(1) = 0)<br/>&nbsp; Hexagon(3) = Array(-s / 2 * Tan(30 * 3.1415926 / 180), -s / 2)<br/>&nbsp; Hexagon(4) = Array(s / 2 * Tan(30 * 3.1415926 / 180), -s / 2)<br/>&nbsp; Hexagon(5) = Array(s * Tan(30 * 3.1415926 / 180), pp(1) = 0)<br/>&nbsp; Hexagon(6) = Array(s / 2 * Tan(30 * 3.1415926 / 180), s / 2)<br/>&nbsp; <br/>&nbsp; For ii = 0 To UBound(Hexagon) - 1<br/>&nbsp;&nbsp;&nbsp; pp(0) = Hexagon(ii)(0): pp(1) = Hexagon(ii)(1)<br/>&nbsp;&nbsp;&nbsp; ppp(0) = Hexagon(ii + 1)(0): ppp(1) = Hexagon(ii + 1)(1)<br/>&nbsp;&nbsp;&nbsp; Set objLine = ThisDrawing.ModelSpace.AddLine(pp, ppp)<br/>&nbsp; Next ii<br/></p>
页: [1]
查看完整版本: 正六形形顶点坐标