# excel – Gain function based on the Bezier curves

Looking forward to a gain function, for range 0-1, where the output, obviously goes from 0-1 but at different pace

Sure there is plenty of Log, Squares, sigmoids, tanhs but I was looking to something more flexible, and the I tough of the beizer curves: example:

where four parameters allow almost any curve,

Especially useful are the ones that the second set of parameters are symmetric, where it covers logit, square logit, symlog, and all the possible intermediary curves. i.e.

• https://cubic-bezier.com/#.9,.1,.1,.9
• https://cubic-bezier.com/#.5,.1,.1,.5
• https://cubic-bezier.com/#.8,.3,.3,.8
• https://cubic-bezier.com/#.2,.8,.8,.2

let’s go math, I see the Beziers, which those are referred to 4 points, are described as :

For both axes X and Y, based on the parameter t, which ranges 0-1

So, to make the gain function, I would need to express Y on base of Y, and as the point 1 in our case is (0,0), and point 4 is (1,1) and P2 and P3 will be our input parameters (as the cubic-bezier.com examples) . So I could write:

• X = Xa3(1−t)^2t + Xb*(1−t)*t^2 + t^3
• Y = Ya3(1−t)^2t + Yb*(1−t)*t^2 + t^3

Clear t in the first, substitute in the second, and we will have:

• f(x) = y = (¿Xa,Xb,Ya,Yb?)·x

But this goes beyond by far of my capabilities :_((

Can anybody help me?

Loking forward to be able to implement on excel, on ptyhon and simple things like :