I have a set of points distributed randomly over a span of let's say, $0$ to $100$. I need to have a function to slightly modify its $y$ position depending on a $g$ variable. When $g$ is zero, here is no modification at all (green line). When $g$ is $1$ it should look like the red curve on the graphic below. When $g$ is $-1$, like the black curve. Brown and grey curves show behavior for $0 < g < 1$ and $0 > g > -1$ respectively.
I have tried several solutions starting from $y=x+g$ (?) so when $g$ is $0$ I get a linear equation but I fail to get points at $min$ $(0)$ or $max$ $(100)$ unmodified.
Unfortunately my math knowledge is so limited that I don't even know what exactly should my search query look like, what to ask, which tags to add to this post or what would be a suitable title for this question.
