-
Expressions and sine waves
Hi,
I created a simple AE animation using the “write-on” effect.
In the “position argument” of the effect, I wrote this expression:
freq=5.5;
amp=100;
veloc=192;
x=time*veloc;
y=amp*Math.sin(time*freq*Math.PI)+thisComp.height/2;
[x,y]
This will progressively draw a sine wave from left to right until it fills the screen horizontally after 10 seconds. Although the drawing is progressive, the wave itself is static as each crest and trough remains at its position. The only thing that is dynamic is the drawing.
<font face=”inherit”>The thing is that I want is the other way around</font>:
<font face=”inherit”>I would like to have the exact same sine wav but drawn all at once since the very first frame and then see it move from right to left, infinitely. </font>So the wave is always filling the screen horizontally but the crests and troughs should be moving from right to left.
<font face=”inherit”>The same way one would look straight ahead and watch a infinite train passing by </font>perpendicularly,<font face=”inherit”> from right to left</font>
I searched the internet for quite a while and don’t see anything that would help me do that.
Any help would be appreciated.