# Why does “sin(frame)” where frame is “1” set a shape key to 0.841 and not 0.017?

I am trying to animate a shape key oscillating between -1 and 1 by driving it with the expression "sin(frame)".

I would expect that to result in the shape key value being "0" at frame 0 and 180, a value of "1" at frame 90, and a value of "-1" at frame 270.

Instead, I am getting a very rapid oscillation which never becomes negative, and has bizarre values that I wouldn't expect. The sin of 1° is 0.017, so I would think the sin of 1 frame is 0.017, but instead it is resulting in 0.841.

Here's a screenshot of this simple setup at frame 0:

And at frame 1:

Thank you for your help! -Ben

• Use this expression: sin(radians(frame)) The sin function expects angles in radians apparently – TLousky Dec 30 '15 at 16:03
• that seems to be it, however it seems shape keys can't be negative. Do you want to post that as the answer so I can accept it? – Ben Mora Dec 30 '15 at 16:15
• Just did, cheers. You're right about shapekey min and max values. – TLousky Dec 30 '15 at 16:28

The sin function expects angles in radians, rather than in degrees, which is why the correct driver expression will be:
sin(radians(frame))