Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a product that has a visual transition. I've found that applying a simple filter that results in an exponential decay (starting fast, then tapering off) is pleasing in one direction. The problem is that going the other direction with the same filter looks bad. The filter I'm using is of the form:

$$ Y_\text{next} = Y_\text{current} + \alpha\left(\text{target}-Y_\text{current}\right) $$

What I basically need is the reverse behavior, where the transition starts out slow and then speeds up. Imagine playing the exponential decay I currently see "in reverse". I'm stumped as to the formulation, however. Note that I needn't have one formula to cover all cases, as I can switch the behavior depending on direction and/or current value.

This feels like a recurrence-type problem, but my familiarity with that topic is woefully out of date.

Thanks in advance.

share|cite|improve this question
How about using $\alpha^{-1}$, for exponential growth? – Neal Mar 11 '12 at 1:18
α is a constant, and $\left(target - Y_{current}\right)$ is still decreasing as target is approached thus that term is getting smaller. – LVB Mar 11 '12 at 1:23
I don't quite understand the question. What exactly do you mean by "the other direction"? Are $Y$ and $target$ functions of time? If so, are you allowed to "look into the future" in your formulation? – Rahul Mar 11 '12 at 1:42
Okay, I thought about this a little more and I'm not going to be stupid this time. You might try fitting to an exponential growth that terminates at $t = T$ with value $target$: $Y(t) = target \exp{\alpha(t - T)}$. In these terms, your current model is something like $Y(t) = target( 1 - \exp{\alpha t} ).$ – Neal Mar 11 '12 at 2:10
Neal: I will try something like what you're proposing. I also will be investigating some simple rate limiting based on absolute value. Not elegant, but this is a real device (with a real ship date!), and being a perception thing it needn't be a perfect transition. If I can achieve something close it will probably look OK. – LVB Mar 13 '12 at 4:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.