What is this falloff function called?

Started by
8 comments, last by way2lazy2care 11 years, 1 month ago

I've seen this function used for falloff before, but I've never known it's name. It makes it very hard for me to find again, but I've used it many times.

Does anybody know if it has a name/what it is?

y = a + b*(c/(c+x))

It's nice because it's a very tweakable and simple function that doesn't do anything too crazy for unexpected values for x. Also open to knowing other cool falloff functions that might be interesting :)

Advertisement

The graph of that function is called a "hyperbola". What are you going to do with these functions?

EDIT: I think you can also call it "inverse falloff".

Are you talking about functions with horizontal asymptotes (particularly ones that decrease as x gets larger)? Pretty much anything of the form:

y = a + b / (c + x)

and

y = a + bc - d * x (where d > 0)

and several other forms. If you're familiar with limits, you can come up with any function you want and find out if it has a horizontal asymptote.

[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Are you talking about functions with horizontal asymptotes (particularly ones that decrease as x gets larger)? Pretty much anything of the form:

y = a + b / (c + x)

and

y = a + bc - d * x (where d > 0)

and several other forms. If you're familiar with limits, you can come up with any function you want and find out if it has a horizontal asymptote.

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.

The graph of that function is called a "hyperbola". What are you going to do with these functions?

It's more like a sideways tan function isn't it? I'm not looking for anything in particular, I just noticed that this function tends to fit all of my needs when I am looking for falloff, but all the ones I find when I google "falloff functions" aren't anything close to what I want.

I guess the general use case is when you want a predictably bounded value with non-linear falloff.

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.

That function you posted has a vertical asymptote at x = -c (look at x = -5 in that graph). Also, yes, the log function's behavior is different for x < 1 than it is for x >=1, but also note that the log function doesn't have a horizontal asymptote (that is, log(infinity) = infinity).

Also, try searching for "decay" functions instead of "falloff" functions.

[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.

That function you posted has a vertical asymptote at x = -c (look at x = -5 in that graph). Also, yes, the log function's behavior is different for x < 1 than it is for x >=1, but also note that the log function doesn't have a horizontal asymptote (that is, log(infinity) = infinity).

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.

Yup, I concur. You just made me realize I messed up the general form for an exponential decay function when I was trying to post. I meant:

y = a + b * cd - e * x (where e > 0, and a, b, c, d, and e are some constants (note that I don't necessarily intend for e to be Euler's number))

Then that function you posted is the same as this one, but with a = 0, b = A, c = e (Euler's number), d = 0, e = 1 / B.

[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Waytolazy, still not sure exactly what you want but ... if you are looking for a function that for postive values of x is monotonically increasing, defined everywhere, but approaches a constant as x goes to infinity i.e. has a horizontal asymptote, then you can use the positive-x part of any sigmoidal function scaled appropriately, e.g., the logistic function or arctangent.

Waytolazy, still not your exactly what you want but ... if you are looking for a function that for postive values of x is monotonically increasing, defined everywhere, but approaches a constant as x goes to infinity i.e. has a horizontal asymptote, then you can use the positive-x part of any sigmoidal function scaled appropriately, e.g., the logistic function or arctangent.

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.

Yup, I concur. You just made me realize I messed up the general form for an exponential decay function when I was trying to post. I meant:

y = a + b * cd - e * x (where e > 0, and a, b, c, d, and e are some constants (note that I don't necessarily intend for e to be Euler's number))

Then that function you posted is the same as this one, but with a = 0, b = A, c = e (Euler's number), d = 0, e = 1 / B.

These are both great. SUPAH :)

This topic is closed to new replies.

Advertisement