Python 为什么maya返回的值与3ds max不同?
为什么maya为cos(1)返回的值与3ds Max不同?我试着做一个圆形,对这个话题感到困惑 Maya返回:Python 为什么maya返回的值与3ds max不同?,python,trigonometry,maya,Python,Trigonometry,Maya,为什么maya为cos(1)返回的值与3ds Max不同?我试着做一个圆形,对这个话题感到困惑 Maya返回: import math p = math.cos(1.0) print p returns: 0.540302305868 3ds Max返回: p = cos(1.0) print p returns: 0.999848 在3ds Max中,这将返回一个完美的圆。在maya中,我不确定它会发生什么…希望这只是我忽略的某件事,导致它导致意外行为 import maya.cmds a
import math
p = math.cos(1.0)
print p
returns: 0.540302305868
3ds Max返回:
p = cos(1.0)
print p
returns: 0.999848
在3ds Max中,这将返回一个完美的圆。在maya中,我不确定它会发生什么…希望这只是我忽略的某件事,导致它导致意外行为
import maya.cmds as cmds
import math
cmds.file(new=True, f=True)
radius = 10
sides = 8
ang = 360.0 / sides
pts = []
for i in range(0,sides):
x = radius * math.cos(i * ang )
y = 0
z = radius * math.sin(i * ang)
pt = (x, y, z)
print i
pts.append(pt)
cmds.curve(d=1, p=pts )
3ds max中的
cos
可能需要度。而math.cos
期望弧度
In [66]: math.cos(1)
Out[66]: 0.5403023058681397
In [67]: math.cos(math.radians(1)) #Converting 1 degree to radians
Out[67]: 0.9998476951563913
3ds max中的
cos
可能需要度。而math.cos
期望弧度
In [66]: math.cos(1)
Out[66]: 0.5403023058681397
In [67]: math.cos(math.radians(1)) #Converting 1 degree to radians
Out[67]: 0.9998476951563913
3ds max中的
cos
可能需要度。而math.cos
期望弧度
In [66]: math.cos(1)
Out[66]: 0.5403023058681397
In [67]: math.cos(math.radians(1)) #Converting 1 degree to radians
Out[67]: 0.9998476951563913
3ds max中的
cos
可能需要度。而math.cos
期望弧度
In [66]: math.cos(1)
Out[66]: 0.5403023058681397
In [67]: math.cos(math.radians(1)) #Converting 1 degree to radians
Out[67]: 0.9998476951563913
令人惊叹的。非常感谢。在这之前我都没想过。太棒了,太棒了。非常感谢。在这之前我都没想过。太棒了,太棒了。非常感谢。在这之前我都没想过。太棒了,太棒了。非常感谢。在这之前我都没想过。伟大的作品