Forum search & shortcuts

Ease In Ease Out Cu...
 

[Closed] Ease In Ease Out Curves

Posts: 11402
Free Member
Topic starter
 
[#12284635]

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 8:25 pm
Posts: 585
Free Member
 

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


 
Posted : 11/03/2022 8:48 pm
Posts: 779
Free Member
 

Sigmoid-ish?


 
Posted : 11/03/2022 9: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 9:25 pm
Posts: 11402
Free Member
Topic starter
 

Sigmoid-ish?

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


 
Posted : 11/03/2022 9: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 10: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 : 12/03/2022 12:15 am
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 2:02 pm
Posts: 779
Free 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 2:34 pm
Posts: 17336
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 2: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 12:09 pm
Posts: 1526
Full Member
 

Unexpected maths content.


 
Posted : 15/03/2022 9:22 am
Posts: 938
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 11:11 am
Posts: 11855
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 11: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 11:47 am
Posts: 938
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 12:42 pm
Posts: 11402
Free Member
Topic starter
 

Easing Cheat Sheets


 
Posted : 15/03/2022 4:47 pm