ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Math.sin curve question

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ilya Sire
Math.sin curve question
on May 15, 2019 at 2:15:46 pm

Hi,

I have this curve line in Z (white line), how can i have more like half circle (red line) ?
please image below
https://drive.google.com/open?id=1AOazN4yqClY98GZyiySxZkLf52khD7xr

here i attached the aep
13345_p2pcurved.aep.zip


Return to posts index

Oleg Pirogov
Re: Math.sin curve question
on May 16, 2019 at 1:02:18 am

Change
s=Math.abs(Math.sin(linear(time,0,1,0,1)*Math.PI)*300);
to
q1=thisComp.layer("Ellipse "+thisProperty.propertyGroup(1).name.split("-")[0]).transform.position[0];
q2=thisComp.layer("Ellipse "+thisProperty.propertyGroup(1).name.split("-")[1]).transform.position[0];
s=Math.abs(Math.sin(Math.acos(linear(time,0,1,1,-1)))*(q1-q2)/2);


BTW, you'll get these artifacts:

cause that's Particle World interpolates between frames. A workaround for this is to increase frame rate to something like 240 or stretch the whole animation in time.


Return to posts index

Ilya Sire
Re: Math.sin curve question
on May 16, 2019 at 5:56:09 am

yes increase frames will make smoother it too,
thank you for your help. I really appreciate it

Ilya


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]