Sin(x)+x “stairs” curve, but which starts from the “flat” part

graphing-functions

I'm not a math person, but I use math curves in my animation work with Blender.

I would need this sin(x)+x "stairs" curve, but it should begin from the red dot being in the origin.

Ideally the "stairs" should be the height of 1.0 per each and the width of 1.0 from each other, but this is not required if it makes things too complicated.

How the formula should be edited in order to get that desired result?

BONUS, extra appreciation if some other methods are provided to make the vertical part of the "stairs", or the lines pointing upwards, to grow and shrink more exponentially than now. Like this.

enter image description here

Best Answer

To get the red dot on the $y$-axis (where $x=0$) instead of at $x=\pi$, shift the variable $x$ by $-\pi$ to get $$\sin(x-(-\pi))+(x-(-\pi))=\sin(x+\pi)+(x+\pi).$$ To get the red dot on the $x$-axis (where $y=0)$ instead of at $y=\pi$, shift the whole function by $-\pi$ to get $$\sin(x+\pi)+(x+\pi)-\pi=\sin(x+\pi)+x.$$ To get steps of width $1$ instead of width $2\pi$, scale the variable $x$ by a factor $2\pi$ to get $$\sin\left(2\pi x+\pi\right)+2\pi x.$$ To get the steps of height $1$ instead of $2\pi$, scale the whole function down by a factor $2\pi$ to get $$\frac{\sin\left(2\pi x+\pi\right)+2\pi x}{2\pi}=\frac{1}{2\pi}\sin(2\pi x+\pi)+x.$$

Related Question