Ease In Ease Out Cu...
 

Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop

[Closed] Ease In Ease Out Curves

16 Posts
8 Users
0 Reactions
120 Views
Posts: 11402
Free Member
Topic starter
 

trying to find the ease in out function that matches this curve.

it's none of the usual suspects (smooth step or cubic (or any other simple polynomials), I can split it into to 2
bezier solutions but was wondering if there was anything else ?


 
Posted : 11/03/2022 7:25 pm
Posts: 584
Free Member
 

looks like 2 curves to me? be interesting to know the maths behind making it.


 
Posted : 11/03/2022 7:48 pm
Posts: 779
Full Member
 

Sigmoid-ish?


 
Posted : 11/03/2022 8:13 pm
Posts: 11402
Free Member
Topic starter
 

anyone interested the raw data is here it's quite noisey as it was converted from a bitmap


 
Posted : 11/03/2022 8:25 pm
Posts: 11402
Free Member
Topic starter
 

Sigmoid-ish?

don't think so (or any of it's derivatives)


 
Posted : 11/03/2022 8:32 pm
Posts: 2642
Free Member
 

The Weibull failure curve gives a similar 'S' shaped curve.

y = 1 - e^(-(x/x0)^m))

Weibull.png

You might need to offset your x values to get a decent fit, and might have to compute x>0 and x<0 separately.

[edit - I suspect this is also a sigmoidal curve. Must be cleverer...]


 
Posted : 11/03/2022 9:51 pm
Posts: 11402
Free Member
Topic starter
 

got a result that will do, a 2 bezier solution but the maths isn't pretty 🙂

series 2 is what my function generates and a graphical illustration...

the top is the original, and the bottom my "reverse engineered" variant


 
Posted : 11/03/2022 11:15 pm
Posts: 11402
Free Member
Topic starter
 

found the exact maths in the end turns out it's 2 "scaled" smoothstep functions back to back.


 
Posted : 12/03/2022 1:02 pm
Posts: 779
Full Member
 

Ahh, so I wasn't miles off as a smoothstep is "sigmoid like" according to Wikipedia.

https://en.m.wikipedia.org/wiki/Smoothstep


 
Posted : 12/03/2022 1:34 pm
Posts: 17254
Full Member
 

That’s a pentic polynomial. X^5 will be the highest power. Beware of the function outside the bounds of interest for extrapolation. I’ve fitted a lot worse


 
Posted : 12/03/2022 1:36 pm
Posts: 11402
Free Member
Topic starter
 

be interesting to know the maths behind making it.

the solution i'm going with is....

where t >= 0 and t <= 1

fn hermite t a b = (3 * pow t a - 2 * pow t b) -- variation on smoothstep

fn ease_in_out t =
(
if t <= 0.5 then
0.5 * hermite (t * 2) 1.5 2.15
else
1 - 0.5 * hermite ((1 - t) * 2) 1.5 2.15
)


 
Posted : 14/03/2022 11:09 am
Posts: 1504
Full Member
 

Unexpected maths content.


 
Posted : 15/03/2022 8:22 am
Posts: 926
Free Member
 

What language is all of the above written in? Is it English? 😉
Out of interest, what line of work needs to know this stuff?


 
Posted : 15/03/2022 10:11 am
Posts: 11612
Full Member
 

This sort of thing scares me, we studied this sort of maths at uni to earn a degree in my (now) line of work.

These days though if I use any maths above high school level I tend to suspect I've done something wrong, I dread the day somebody expects me to understand any of the above 😬


 
Posted : 15/03/2022 10:42 am
Posts: 11402
Free Member
Topic starter
 

Out of interest, what line of work needs to know this stuff?

graphics/computer games etc


 
Posted : 15/03/2022 10:47 am
Posts: 926
Free Member
 

graphics/computer games etc

Ah, that figures. I got a C at O-level maths (worked hard for that, got a U the first time around!). Computing was never a thing at my school (mid-80s). I feel a whole strata of computing society moved on without me realising. Is it just me...?


 
Posted : 15/03/2022 11:42 am
Posts: 11402
Free Member
Topic starter
 

Easing Cheat Sheets


 
Posted : 15/03/2022 3:47 pm