6
$\begingroup$

So I came across this 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: $$y=\frac{\sin x}{\cos(\min(x \mod \pi/2, \pi/2- (x \mod \pi/2)))}$$

(The equation plotted on Wolfram 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?

$\endgroup$
3
  • $\begingroup$ Are there discontinuities in the plots? Do you really want those? $\endgroup$ Commented Sep 8, 2013 at 23:44
  • $\begingroup$ Yes, there are. I don't want them, but I wanted to make the equation as simple as possible $\endgroup$ Commented Sep 9, 2013 at 0:16
  • $\begingroup$ Here is a related question. $\endgroup$ Commented Jun 18, 2016 at 7:26

1 Answer 1

3
$\begingroup$

Start with a "triangle" function of period $2 \pi/n$, minimum value $0$ and maximum value $\pi/n$: a suitable choice is $T_n(t) = \frac{1}{n} \arccos(\cos(n t))$. A regular $n$-gon of inradius $r_0$ is given, in polar coordinates, by $r = r_0/\cos(T_n(\theta - \theta_0))$. Its $y$ coordinate is then $$y = \dfrac{r_0 \sin(\theta)}{\cos(T_n(\theta - \theta_0))}$$

Here is a similar animation using a pentagon ($n=5$):

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks for the answer, but I'm not sure I understand. How do you find the T function? The one you provided simplifies itself to the argument for any n. Can you please explain further? Cool animation btw $\endgroup$ Commented Sep 9, 2013 at 6:09
  • $\begingroup$ No, it's not the argument. The point is that by definition $\arccos(anything)$ is always in the interval $[0, \pi]$. For $0 \le t \le \pi/n$ you do have $T_n(t) = t$. But in the next interval $\pi/n \le t \le 2\pi/n$ you get $T_n(t) = 2\pi/n - t$ (its value at $t = \pi/n$ is $\pi/n$, but at $t = 2\pi/n$ it's back to $0$). And then it repeats. The result is a "triangular wave". $\endgroup$ Commented Sep 9, 2013 at 6:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.