[英]How can I find the angle between two points of a circle?
我有圓和半徑的centerX和centerY值。 現在我有(x1,y1)點位於圓上。 我想知道該點的圓角。
我嘗試下面的公式來獲取(x1,y1)的角度。 但這並沒有給出通用的解決方案。
radian = Math.Atan2(y1 - Cy, x1 - Cx); angle = radian * (180 / Math.PI);
請參閱我的要求的屏幕截圖。
有人讓我建議我做錯了嗎?
從Atan2的MSDN文檔頁面 ,它返回-180至180度(-pi至pi弧度)之間的結果。 另一方面,您需要0到360。為此,只需將360(如果為負)添加到最終答案(以度為單位)。
radian = Math.Atan2(y1 - Cy, x1 - Cx); angle = radian * (180 / Math.PI); if (angle < 0.0) angle += 360.0;
[英]How can I find a circle angle from x and y axis
[英]How to obtain subtended angle between two points relative to a third point?
[英]How to get an angle between 3 points?
[英]How do i find the distance between two points/pixels?
[英]Find Angle Between Two Vectors
[英]calculate angle between horizontal axis and two points
[英]How to find a point that is on the same circle given an angle?
[英]Find the angle between any point inside a circle and the up vector direction
[英]Drawing a parabolic arc between two points based on a known projectile angle
[英]How do i find the middle point/s coordinates between two points?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.