Home > After Effects > Use sin() to oscillate waves in After Effects

Use sin() to oscillate waves in After Effects

This expression will make something oscillate back and forth on the x axis, such as “puppet show” waves

amplitude = 10;
frequency = 3;
temp=amplitude*Math.sin(time*frequency)+amplitude;
// add the result to the current x pos
temp=temp+transform.position[0];
//plug the new x into slot 0. y is currently left unchanged
[temp, transform.position[1]]

Advertisement
Categories: After Effects Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.