I have a triangle wave equation represented as $$ y = \dfrac{A \cdot \left(P - \lvert\;\left(x \mod (2 \cdot P) \right) - P \;\rvert\right)}{P} $$ where $A$ is the amplitude and $P$ is half of the period.
This equation starts at $(0,0)$. However, I would like the equation to start from an arbitrary point $(x,y)$. I can shift the wave vertically, but not horizontally. Is there any way to do that?
If it isn't possible with this equation, is there any general equation representing a Triangular wave with user defined starting point?
Shifting to the right by $x_0$ is accomplished by $$y = \left(\frac A P\right)(P - \lvert(x - x_0) \text{ mod } (2P) - P\rvert).$$