首页 文章

在给定中心坐标,半径和扫掠角的情况下,如何计算圆弧的终点坐标?

提问于
浏览
3

我在找到计算弧终点坐标的方法时遇到了麻烦 . 我知道 centre point coordinatesradius (宽度和高度相同), start angleend angle (如php imagefileldarc()函数所需) . 由此,我如何计算弧的终点坐标?

我试过以下公式无济于事:

$end['x'] = cos($Angle) * $Radius + $CenterX; 
$end['y'] = sin($Angle) * $Radius + $CenterY;

非常感谢

1 回答

  • 2

    你绘制弧线的事实并不重要 . 您的计算将永远是:

    x = cos(角度)* ratio centerx
    y = sin(角度)*比率居中

相关问题