0

我正在尝试确定半径为 r 的圆上的点 x,y,我想对其应用参数方程,如下所述: https ://www.mathopenref.com/coordparamcircle.html

import math

radius = 45
t = 10

x = radius*math.cos(t)
y = radius*math.sin(t)

对于 x 和 y,我得到以下输出:

x
Out[217]: 5.253219888177298

y
Out[218]: 8.509035245341185

我不明白为什么。据我了解,如果 r 为 45,x 和 y 应该具有相同的值。知道吗?

4

1 回答 1

2

请注意,此处 t 为 10。

当 t 的输入为 45 度时,它们应该为您提供相同的值。不过,您必须将它们转换为弧度。

import math

radius = 10
t = 45

x = radius*math.cos(math.radians(t))
y = radius*math.sin(math.radians(t))
print(x,y)

给我们

7.07106781187 7.07106781187
于 2019-06-16T13:35:21.607 回答