发现的一个圆的边缘的坐标 [英] Finding the coordinates on the edge of a circle
本文介绍了发现的一个圆的边缘的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用C#:
我如何得到(X,Y)在圆的边缘坐标对于任何给定的程度,如果我有中心坐标?半径
How do I get the (x, y) coordinates on the edge of a circle for any given degree, if I have the center coordinates and the radius?
有可能是SIN,TAN,COSIN和其他年级10涉及的数学...:)
There is probably SIN, TAN, COSIN and other grade ten math involved... :)
推荐答案
这无关用C#。只是有一些涉及初等数学。
This has nothing to do with C#. There is just some elementary mathematics involved.
x = x0 + r * cos(theta)
y = y0 + r * sin(theta)
THETA是弧度,x0和y0中心的坐标,R是半径,角度是从x轴测量逆时针。但是如果你想在C#中,你的角度是在度:
theta is in radians, x0 and y0 are the coordinates of the centre, r is the radius, and the angle is measured anticlockwise from the x-axis. But if you want it in C#, and your angle is in degrees:
double x = x0 + r * Math.Cos(theta * Math.PI / 180);
double y = y0 + r * Math.Sin(theta * Math.PI / 180);
这篇关于发现的一个圆的边缘的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文