Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

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?

$\endgroup$

2 Answers

$\begingroup$

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).$$

$\endgroup$ 1 $\begingroup$

First, look at this article in Wikipedia.

Second, this equation is a starting point for the triangle wave. sin y = cos x

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy