What is the simplest formula for smooth step function (Or smooth transition function)?

341 Views Asked by At

I am working on designing a smooth step function, which is changing from 0 to 1 while x changes from a to b, and this f(x) are expected can equal to 0 or 1 exactly at point a or at point b. I am using the sigmoid function which only the position of f(x)=1/2 be controlled not the point a and b (see the following picture). example Thank you very much.

1

There are 1 best solutions below

0
On

Have you considered a cubic polynomial? That should provide you with enough degrees of freedom (4) to control the location of where the value is 0 or 1 and the slope at those endpoints. Of course outside of those endpoint the cubit wouldn't make sense and you may need a different piecewise solution.

Smoothstep is an example of this type of function.

You may also be interested in: Continuous non-piecewise equivalent of smoothstep function?