How can I get the modulus to a certain range and then ignore all terms above a certain value

29 Views Asked by At

I have a modulus below, how can I ignore all values above 1, so there are essentially "spaces" or discontinuous regions.

enter image description here

enter image description here

My goal is to create a triangle wave that follows a zigzag pattern between 0 and 1, with an interval of n*pi in the same form as two x-inverted modulus functions cut off at y >= 1, as seen below: Essentially I want to make this graph with a single formula:

enter image description here

I could technically do this with a piecewise function but in this scenario I specifically cannot use them:

enter image description here