In article
<4fb231e7-1349-482a-88ec-0c991e00153a@[EMAIL PROTECTED]
>,
Mensanator <mensanator@[EMAIL PROTECTED]
> wrote:
> On Jul 2, 3:02 pm, 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)?
AFAICT the *derivative* of the wanted curve would behave something like
that.
> 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: =IF(D2<=0.4,(2*D2)^2,IF(D2>=0.6,(2*(0.5-
> (D2-0.6)))^2,1))
I get the impression Bill is after a sigmoid shape: perhaps something
like
s = (9/20)(curt((t/5)-1) + 11/9)
would be a reasonable approximation -- although the steeply rising
****tion in the middle may be more abrupt than desired. I believe a true
sigmoid involves hyperbolic trig functions or the like, but a curve
based on the inverse tangent function might also work. Anyway, the
function above yields the following table of values:
time scale
0 0.100
1 0.132
2 0.170
3 0.218
4 0.287
5 0.550
6 0.813
7 0.882
8 0.930
9 0.968
10 1.000
--
Odysseus


|