Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Math.sin curve question

  • Oleg Pirogov

    May 16, 2019 at 1:02 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.

  • Ilya Sire

    May 16, 2019 at 5:56 am

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

    Ilya

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy