Why doesn't this converge to $\pi$? $\lim_{n\to\infty}\frac12\sqrt{2-2\cos( \frac{2 \pi}{n} )} \times n$ Suppose a regular polygon with $n$ side has radius (line from center to point that connect sides *I don't know how to call it) of length $r$.
From cosine law, the side would has length of  $$\sqrt{2r^2-2r^2\cos( \frac{2 \pi}{n} )} $$
Perimeter would be $$\sqrt{2r^2-2r^2cos( \frac{2 \pi}{n} )}  \times n $$
Circle has infinitely-many sides and circumference of $2\pi r$
So $$\lim_{n \rightarrow \infty}  \sqrt{2r^2-2r^2\cos( \frac{2 \pi}{n} )}  \times n= 2 \pi r$$
And
 $$\lim_{n \rightarrow \infty} \frac{\sqrt{2-2\cos( \frac{2 \pi}{n} )}  \times n}{2}= \pi$$
But, when I plot it on Desmos, the graph scatters at $5.9\times 10^8$ (in the picture). Can anybody give me reason why this happens? 
Graph

As I commented, I can't seem to replicate your graph. However, there is this:
Note that, by a Half-Angle Identity, we have $1-\cos\theta = 2\sin^2(\theta/2)$, so your expression reduces to $$\lim_{n\to\infty}n\sin\frac{\pi}{n}$$ which we can cleverly rewrite as $$\pi\cdot\lim_{n\to\infty}\frac{\sin(\pi/n)}{\pi/n}=\pi\cdot\lim_{m\to 0}\frac{\sin m}{m}$$
(by taking $m=\pi/n$). It's a fundamental fact in Calculus (you'll find many proofs here) that the limit expression on the right-hand side is $1$ (when $m$ is in radians), so that, in fact, your limit should converge to $\pi$.
