Closed-form (non-iterative) PID solution: https://www.desmos.com/calculator/mu80ttc9aa function sprung_response(t,pos,vel,k,c,m) local decay = c/2/m local omega = math.sqrt(k/m) local resid = decay*decay-omega*omega local scale = math.sqrt(math.abs(resid)) local T1,T0 = t , 1 if resid 0 then T1,T0 = math.sinh(scale*t)/scale , math.cosh(scale*t) end local dissipation = math.exp(-decay*t) local evolved_pos = dissipatio…
I'm Unsatisfied with Easing Functions
71–80 of 88 posts
Re: I'm Unsatisfied with Easing Functions
#72Closed-form (non-iterative) PID solution: https://www.desmos.com/calculator/mu80ttc9aa function sprung_response(t,pos,vel,k,c,m) local decay = c/2/m local omega = math.sqrt(k/m) local resid = decay*decay-omega*omega local scale = math.sqrt(math.abs(resid)) local T1,T0 = t , 1 if resid 0 then T1,T0 = math.sinh(scale*t)/scale , math.cosh(scale*t) end local dissipation = math.exp(-decay*t) local evolved_pos = dissipatio…
Re: I'm Unsatisfied with Easing Functions
#73Re: I'm Unsatisfied with Easing Functions
#74Closed-form (non-iterative) PID solution: https://www.desmos.com/calculator/mu80ttc9aa function sprung_response(t,pos,vel,k,c,m) local decay = c/2/m local omega = math.sqrt(k/m) local resid = decay*decay-omega*omega local scale = math.sqrt(math.abs(resid)) local T1,T0 = t , 1 if resid 0 then T1,T0 = math.sinh(scale*t)/scale , math.cosh(scale*t) end local dissipation = math.exp(-decay*t) local evolved_pos = dissipatio…
Re: I'm Unsatisfied with Easing Functions
#75Closed-form (non-iterative) PID solution: https://www.desmos.com/calculator/mu80ttc9aa function sprung_response(t,pos,vel,k,c,m) local decay = c/2/m local omega = math.sqrt(k/m) local resid = decay*decay-omega*omega local scale = math.sqrt(math.abs(resid)) local T1,T0 = t , 1 if resid 0 then T1,T0 = math.sinh(scale*t)/scale , math.cosh(scale*t) end local dissipation = math.exp(-decay*t) local evolved_pos = dissipatio…
Wow. This is so good. I would never imagine using PID control for animation motion. Saving this.
Re: I'm Unsatisfied with Easing Functions
#76Re: I'm Unsatisfied with Easing Functions
#77Earlier quoted context omitted.
Overshoot is important for scroll views. Without the bounce, there is no feedback if you have scrolled to the edge or not. Early Android lacked the bounce, and it would invariably lead to users scrolling again to be sure they had indeed scrolled to the edge of the view.
> Early Android lacked the bounce Early android had some visual feedback (a gradient that faded out) instead of the bounce, possibly because Apple owns a patent ( https://patents.google.com/patent/US7469381B2/en ). Current Android still does not use the bounce, and instead stretches the content, which works well enough on the high resolution screens that we have now.
Re: I'm Unsatisfied with Easing Functions
#78Bouncy animations that overshoot just seem like a bad idea in general. The purpose of a UI animation is to guide the eye, but the bounce explicitly introduces a reversal of motion at the end before stopping. Easing functions are just very cargo culty. We've had the same basic set that dates from the Flash era. Now there's an Apple variant that's just a parametric version of the same idea, but it lacks guaranteed cont…
Overshoot is important for scroll views. Without the bounce, there is no feedback if you have scrolled to the edge or not. Early Android lacked the bounce, and it would invariably lead to users scrolling again to be sure they had indeed scrolled to the edge of the view.
Re: I'm Unsatisfied with Easing Functions
#79Oscullation/"anticipation" in transitions is so gimmicky and cartoonish. Living things don't move like that, and mechanical things don't unless they are broken, chintzy, or poorly designed (underdamped).
Re: I'm Unsatisfied with Easing Functions
#80I've used the same easing function in my personal projects for decades now - move the variable 90% of the way to the goal every 80 milliseconds.