【发布时间】:2013-07-22 20:18:14
【问题描述】:
我正在使用脚本来创建形状,通常您可以使用图像映射来绘制坐标,但此脚本使用的是圆半径中的坐标。
是否有从圆半径绘制坐标的工具或更好的绘制坐标的方法,例如:
这适用于多边形/星形,很难获得对称的形状。 我将制作其他更复杂的形状
circles.push(new Circle(width / 2 - 70, height / 2 - 120, circleRadius));
circles.push(new Circle(width / 2 - 0, height / 2 - 250, circleRadius));
circles.push(new Circle(width / 2 + 70, height / 2 - 120, circleRadius));
circles.push(new Circle(width / 2 + 220, height / 2 - 120, circleRadius));
circles.push(new Circle(width / 2 + 120, height / 2 - 0, circleRadius));
circles.push(new Circle(width / 2 + 180, height / 2 + 180, circleRadius));
circles.push(new Circle(width / 2 - 0, height / 2 + 120, circleRadius));
circles.push(new Circle(width / 2 - 180, height / 2 + 180, circleRadius));
circles.push(new Circle(width / 2 - 120, height / 2 - 0, circleRadius));
circles.push(new Circle(width / 2 - 220, height / 2 - 120, circleRadius));
【问题讨论】:
标签: javascript coordinates kineticjs geometry shapes