So I came across this picture on google+ https://lh3.googleusercontent.com/1bOQNmazpHzWHNlfuVRk14VgUieJRZSxRP3_VBQo0VT-=w500-h450-nothis picture
on Google+ and I wanted to understand further. I created an equation for the second wave, the one with the square. Here it is: sin(x)/cos(min((x)mod$$y=\frac{\sin x}{\cos(\min(x \mod \pi/2, \pi/2- (x \mod \pi/2)))}$$
(pi/2), pi/2-The equation plotted on ((x)mod(pi/2)))) http://www.wolframalpha.com/input/?i=sin%28x%29%2Fcos%28min%28%28x%29mod%28pi%2F2%29%2C+pi%2F2-+%28%28x%29mod%28pi%2F2%29%29%29%29Wolfram Alpha.)
It's fine, but I feel like using mod and min is kind of nasty. Can anyone offer improvement to my equation and/or general insight towards further polygons?