Currently, my program takes in an input and determines the output as a step function (if x >= 30, y = 100, else y=0). Another version has y=x at all times. Through both functions, y can only go from 0 to 100. I would like to have a third parameter that takes the function slowly from one to another.
One option was to just give it a weight (y=F1*alpha + F2 (1-alpha) such that alpha goes from 0 to 1 over time). However this leads to a discontinuous function which I am trying to avoid.
My ideal solution would look like a logistic function curve, but the end points have to be within 0 and 100. The step is also changing and can be anything between 0 and 100.
So is there any such function that may enable me to transition from a step function slowly to a y=x slope?
Have you heard of the sigmoid function? You can use $$ S(x) = \frac{1}{1+e^{-x}} = \frac{1}{1+\exp{-x}} $$ to approximate a step function. Furthermore, you can modify the strength of the "jump" by replacing $x$ by $kx$ in this function. So now you could approximate the step function in your case by $$ S_1 (x) = \frac{100}{1+\exp{(-k(x-30))}} $$ for some value $k$. You should try out different values of $k$ and find one that suits you. Maybe try $k=5, 10, 20, \ldots$. Then just blend $S_1$ with the other function, $g(x) = x$. We want the final form to be something like $$ f(x) = (1-\alpha(x)) S_1(x) + \alpha(x) g(x) $$ where $\alpha(x)$ slowly grows from 0 to 1. For this, we can again use the sigmoid function! Let's set $\alpha(x) = \frac{1}{1+\exp{-x}}$. For this we would probably want another strength factor and an offset, so let's actually set $$ \alpha(x) = \frac{1}{1+\exp{(-k_2(x-x_0))}} $$ Here $x_0$ is an offset value, starting from which the blending will start. I don't know which offset value you need, but you can try different versions. I tried values $k=8$, $k_2=0.06$ and $x_0=200$ and I think it looks nice:
https://www.desmos.com/calculator/qkhrufeuym