简体   繁体   English

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

[英]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.

相关问题 如何使用中心和半径找到 Mapbox Draw 圆中的所有坐标? - How can I find all the coordinates in a Mapbox Draw circle using center and radius? 我可以将使用div和border-radius创建的圆分成6个相等的部分,并获得该点的坐标吗? - Can I divide the circle which create by using div and border-radius into 6 equal parts and get that points coordinates? 如何通过单击Google地图添加一个圆并获取圆的坐标和半径? - How to Add a circle and get the coordinates and radius of the circle using one click on the Google Map? 生成随机坐标,存储在圆半径内 - Generate random coordinates, store within circle radius 使用javascript计算圆的半径 - calculate radius of a circle using javascript 如何使用D3查找将圆放在极坐标散点图上的坐标 - How to find coordinates to put circle on polar scatterplot using d3 如何使用 javascript 方法在翻转的圆上找到 x 和 y 坐标 - How to find x and y coordinates on a flipped circle using javascript methods 使用坐标以编程方式旋转形状 - Programmatically rotate shapes using coordinates 如何在不使用 SVG 图像的情况下使用带有文本的 React 创建圆形/方形形状? - How to create circle/square shapes using React with text inside them without using SVG images? 使用范围滑块更改 SVG 圆的半径 - Using a range slider to change the radius of an SVG circle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM