ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Expression 30 sin(10/π x + 30) + 30

FAQ   •   VIEW ALL
 Expression 30 sin(10/π x + 30) + 30 on Jan 21, 2019 at 10:41:23 pm

I am trying to control the the y rotation value of an effect using the function: 30 sin(10/π x + 30) + 30 where x is equal to time. how can i make this into a proper expression? P.S. if someone could tell me a good place to teach myself how to program expressions that would be great.

 Re: Expression 30 sin(10/π x + 30) + 30on Jan 21, 2019 at 11:21:54 pm

If I'm interpreting it right, I think it would be like this:

30*Math.sin((10/Math.PI)*time + 30) + 30

Dan

 Re: Expression 30 sin(10/π x + 30) + 30on Jan 22, 2019 at 1:51:50 am

Looking at this a little more, if what you really want is an expression that oscillates between 0 and 60, at a rate of 5 oscillations per second and starts at 30 degrees, that would be like this:

or, in a more general form, like this:

amp = 30;
offset = 30;
freq = 5;
startAngle = 30;