获得的点的坐标了一圈 [英] Getting Coordinates of a Point in a circle
问题描述
所以我写这吸引了我一个圆的类。我明明知道半径和圆心坐标。比方说,我要画一个点与该中心等于半径(R * 0.5)的一半的距离,并以59度角。
我怎样才能在正确的x和y坐标绘制点?
I $ C $在Android的CD,但我觉得编程语言是不相关的这个问题,它只是一些数学。
我AP preciate你的帮助。
X = R * COS(A)+ X0;
Y = R * SIN(A)+ Y0;
其中,(X0,Y0)是您的圆心,r为半径,A是角度
所以:
X =(R * .5)* COS(59)+ X0;
Y =(R * .5)*罪(59)+ Y0;
so I have written a class which draws me a Circle. I obviously know the radius and the center coordinates of the circle. Let's say I want to draw a Point with a distance to the center equal to the half of the radius (r*0.5) and with an angle of 59 degrees. How can I draw the Point at the correct x and y coordinates?
I coded this in Android, but I think the programming language isn't relevant for this problem, it's just something mathematical.
I appreciate your help.
x = r * cos(A) + x0;
y = r * sin(A) + y0;
where (x0, y0) is the centre of your circle, r is the radius and A is the angle.
So:
x = (r * .5) * cos(59) + x0;
y = (r * .5) * sin(59) + y0;
这篇关于获得的点的坐标了一圈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!