Using my existing formula if I begin with a scale value of 0.1 and end
up with a scale value of 1.0 over the course of 10 seconds, the scale
values would increment .1 every second ( .1, .2, .3, .4, .5, .6, .7, .8,
..9, 1.0 ). I would like to modify the formula so that the change in
value from one call to the next is not linear. I am trying to produce an
ease in and ease out effect.
Bill wrote:
> I use the following formula in my application to scale an image over a
> period of time.
>
> s = ( startScale + ( elapsedTime / duration ) * ( endScale - startScale
> ) ) )
>
> startScale = initial scale value
> endScale = final scale value
> elapsedTime = time elapse since we started
> duration = scaling occurs over this period of time
>
> The result is linear and I would prefer to have some acceleration during
> the beginning and deceleration at the end so that scaling gradually
> increases then decreases during the duration period. Can anyone please
> suggest something better? Ideally I would be able to adjust the amount
> of acceleration and deceleration values, thanks.
>
>


|