使用圆半径查找坐标以创建形状

Find coordinates using circle radius to create shapes

本文关键字:创建 坐标 查找      更新时间:2023-09-26

我使用脚本来创建形状,通常可以使用图像映射来绘制坐标,但此脚本使用的是圆半径的坐标。

有没有一种工具可以根据圆半径绘制坐标,或者有更好的方法来绘制坐标,例如:

这适用于多边形/星形,很难使形状对称。我将制作其他更复杂的形状

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));

为什么不尝试使用与您需要的形状相同的背景图像,这将帮助您获得所需的形状。

对于你所说的多边形,试着使用这些坐标,这会给你一个更好的形状。

circles.push(new Circle(width / 2 - 60, height / 2 - 60, circleRadius));
circles.push(new Circle(width / 2 - 0, height / 2 - 250, circleRadius));
circles.push(new Circle(width / 2 + 60, height / 2 - 60, circleRadius));
circles.push(new Circle(width / 2 + 260, height / 2 - 60, circleRadius));
circles.push(new Circle(width / 2 + 100, height / 2 + 60, circleRadius));
circles.push(new Circle(width / 2 + 160, height / 2 + 250, circleRadius));
circles.push(new Circle(width / 2 - 0, height / 2 + 130, circleRadius));
circles.push(new Circle(width / 2 - 160, height / 2 + 250, circleRadius));
circles.push(new Circle(width / 2 - 100, height / 2 + 60, circleRadius));
circles.push(new Circle(width / 2 - 260, height / 2 - 60, circleRadius));