首先,我知道如何用弧度转换度。你知道吗
我需要画一个给定坐标,半径和两个角度的弧,在pygame顺时针方向。例如:
point = (50, 50)
startAngle = 320
endAngle = 140
应该画些
以及
point = (50, 50)
startAngle = 90
endAngle = 180
应该画些
等等
我尝试过还原角度(即360 - angle
),但pygame反向绘制了弧线;我得到的不是上一张图片中的45⁹弧线,而是270⁹弧线,这是我想要的补充。你知道吗
我想我今天要放屁是因为我搞不懂这个。谢谢您!你知道吗
编辑:我可能有一个答案,但我不确定它是否是一个好的答案。如果我把角度倒过来,把它们取反,它看起来是顺时针画的。例如,第一个例子:
point = (50, 50)
startAngle = 360 - 140
endAngle = 360 - 320
似乎正确地画出了预期的弧线。你知道吗
如果你想画一条顺时针的弧线,那么你必须反转角度,交换开始和结束的角度:
例如:
相关问题 更多 >
编程相关推荐