在矢量中工作.让A从圆心到圆弧起点的载体.计算一下
A = start_point - centre
Run Code Online (Sandbox Code Playgroud)
我们theta是掠角(弧度工作).使用旋转矩阵围绕圆心旋转圆弧开始.http://en.wikipedia.org/wiki/Rotation_matrix
明确地说,
newpoint_x = cos(theta)*A_x + sin(theta)*A_y
newpoint_y = -sin(theta)*A_x + cos(theta)*A_y
Run Code Online (Sandbox Code Playgroud)
其中A_xx分量A(和类似的A_y).然后
newpoint = centre + (newpoint_x,newpoint_y)
Run Code Online (Sandbox Code Playgroud)
是你想要的.可能是这个点出现了错误的旋转方式(逆时针方向),如果是这样,只需使用即可
theta = -theta
Run Code Online (Sandbox Code Playgroud)
代替.这应该适合你.
如果要评估弧的中点,只需使用
theta = theta / 2
Run Code Online (Sandbox Code Playgroud)