Lets say I have a sample plot which I came up with, knowning it will satisfy my needs (in my case procedural generation, but that does not really matter):
So, what would be the process of actually mathematically defining this function, having the plot as a reference? It does not need to be exactly the same, but keeping a similar pattern. One property is that $x$ is always incremented in equal intervals and the function should be defined for any $x>0$.
Thanks.
The plot shows the plot of a composited linear function. To define a function you need a domain, for example $\mathbf R_{>0}$. Then you need to find out the coordinate of the buckle of your function. Let $(a_1,b_1)$ be the first buckle and $(a_2,b_2)$ the second one. Then the first part of your function becomes $x\mapsto \frac{b_1}{a_1}x$ and the second $x\mapsto b_1 + \frac{b_2-b_1}{a_2-a_1}x$. The rest can be done similiar so that you get $$f\colon \mathbf R_{>0} \to \mathbf R, \qquad f(x)=\begin{cases} \frac{b_1}{a_1}x, &\qquad \text{for } x\in(0,a_1] \\ b_1 + \frac{b_2-b_1}{a_2-a_1}x, &\qquad \text{for } x\in(a_1,a_2) \\ \dotsc \end{cases}$$