[英]Find coordinates using circle radius to create shapes
I'm using a script to create shapes, usually you can use an image map to plot coordinates but this script is using coordinates from a circle radius. 我使用脚本来创建形状,通常可以使用图像贴图来绘制坐标,但是此脚本使用的是圆半径的坐标。
Is there a tool to plot coordinates from circle radius or an better way to plot coordinates for example: 是否有工具可以从圆半径绘制坐标,或者有更好的坐标绘制方法,例如:
This is for a polygon/star shape and its very difficult to get the shape symmetrical. 这是用于多边形/星形形状,很难使形状对称。 I will be making other shapes that will be more complex 我将制作其他更复杂的形状
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));
Why don't you try using a background image the same shape as you require, that will help you to get the shape exactly as you require. 您为什么不尝试使用与所需形状相同的背景图像,这将帮助您准确获得所需形状。
For a polygon as you said try using these coordinates which should give you a better shape. 对于您所说的多边形,请尝试使用这些坐标,这将为您提供更好的形状。
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));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.