Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Trying to find Inverse Function — Please Help!

  • Trying to find Inverse Function — Please Help!

    Posted by Lu Nelson on June 29, 2009 at 1:00 pm

    Hi there,

    OK I banged my head against this for quite a while but I can’t figure out how to do it:

    I have a curve expression and I am trying to create a second curve that is the inverse of the other — that is, what the curve would be if reflected in the axis of y=x.

    The curves in question take their beginning and ending values (which can range between 0 and 100) from other expression controls in the same layer, and interpolate using a linear “Progress” value which is keyframed from 0 to 1.

    They are also adjusted in turn so that they each range from 0 to 1 (because I’ll be using them elsewhere as interpolation curves for further parameters).

    Right now, the Expression Control called “Exponential Progress” curves correctly; but the one below it called “Inv. Exponential Progress” has a curve which is a vertical reflection of the former, like what an “ease out” looks like compared to an “ease in”. This is wrong. It should look like the reflection in y=x.

    I really hope one of the math wizards here can solve this one……!!

    Project included here, in CS4 format

    Lu Nelson
    Berlin, Germany

    [MacProQ2.66, 8GB, Sys10.5.6, FCP 6.0.5, AE 9.0.2]

    Lu Nelson replied 16 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    June 29, 2009 at 1:10 pm

    I think you’d just flip x and y. So if the value is in a variable named ‘result’, it would just be [result[1],result[0]].

    dan

  • Lu Nelson

    June 29, 2009 at 1:25 pm

    Ah — I was just responding to your other post

    Yeah I wish I could see how to do that; but if you look at the project you’ll see the data isn’t vector it’s scalar. These curves aren’t animation (spatial) curves they’re value curves, which I want to use for driving interpolations down the line.

    The question is to determine the inverse function, where you’ve got y=f(x), and determine a new equation for y that gives the inverse function…unless I’m missing something obvious?

    Lu Nelson
    Berlin, Germany

    [MacProQ2.66, 8GB, Sys10.5.6, FCP 6.0.5, AE 9.0.2]

  • Lu Nelson

    June 30, 2009 at 12:54 pm

    Well, I looked at using some other curves and their inverses, which were easier to calculate, and it looks like the opposed curve that I had already found in my example above does the trick for what I need better than an inverse would, so I’ll call this one off…

    Thanks for the views and thoughts though

    LMN

    Lu Nelson
    Berlin, Germany

    [MacProQ2.66, 8GB, Sys10.5.6, FCP 6.0.5, AE 9.0.2]

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