[maya] animation curve tangent data

In maya you can adjust the in/out tangent angles of a particular key by inputting degrees, but that data is stored as a vector or something else that I can’t figure out (not degrees).

I’m looking for a formula to convert this data into a degree. Something like tan(deg) = x/y… but I don’t think that’s it.

setAttr -s 1 “.kix[0]” 0.0011640129378065467 # in-tangent-data-X
setAttr -s 1 “.kiy[0]” 0.99999940395355225 # in-tangent-data-Y
setAttr -s 1 “kox[0]” … # out tangent data X
setAttr -s 1 “koy[0]” … # out tangent data Y

xx + yy = 1

Any ideas?

Probably, it’s more like; tan( rad ) = y / x
Or, in Python:

rad = math.atan2( y, x )
deg = 180.0 / math.pi * rad # Convert radians to degrees

I believe they are polar coordinates. And I believe madyasiwi just gave you how to get an angle from a polar coordinate.

Ok, found a powerpoint with a formula that works! I never would have guessed…

You need to take account of the current units and framerate.

30fps
cm

deg = tan ^-1 ( ( y * 1) / (x * 30) )

24fps
m

deg = tan ^-1 ( ( y * .01) / (x * 24) )

google this for the power point: “www.mattosbond.com MotionInMaya.ppt”

1 Like