On Jul 2, 3:02=A0pm, Bill <B...@[EMAIL PROTECTED]
> wrote:
> 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.
You want to start with scale at 0.1, reach 1.0 in the middle and
then back to 0.1 at the end (non-linearly)?
Something like this?
time 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
scale 0.04 0.16 0.36 0.64 1 1 0.64 0.36 0.16 0.04
Excel formula: =3DIF(D2<=3D0.4,(2*D2)^2,IF(D2>=3D0.6,(2*(0.5-
(D2-0.6)))^2,1))
>
>
>
> Bill wrote:
> > I use the following formula in my application to scale an image over a
> > period of time.
>
> > s =3D ( startScale + ( elapsedTime / duration ) * ( endScale -
startSca=
le
> > ) ) )
>
> > startScale =3D initial scale value
> > endScale =3D final scale value
> > elapsedTime =3D time elapse since we started
> > duration =3D scaling occurs over this period of time
>
> > The result is linear and I would prefer to have some acceleration
durin=
g
> > 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.- Hide quoted text -
>
> - Show quoted text -


|