Consider the circle of radius $R$ centered at the origin. That is, the set of points such that $x^2+y^2=R^2$. The upper half of the circle is described by $y=f(x)=\sqrt{R^2-x^2}$. So if we call $\mu(R)$ the circle's perimeter, we have (from the arc-length formula)
\begin{align}
\mu(R)&=2\int_{-R}^R\sqrt{1+f'(x)^2}\,dx=2\int_{-R}^R\sqrt{1+\left(-\frac{x}{\sqrt{R^2-x^2}}\right)^2}\,dx\\ \ \\
&2=\int_{-R}^R\frac{R}{\sqrt{R^2-x^2}}\,dx=2\int_{-R}^R\frac1{1-(x/R)^2}\,dx\\ \ \\
&=2R\,\int_{-1}^1\frac1{\sqrt{1-x^2}}\,dx.
\end{align}
This in particular tells us that the perimeter is proportional to the radius. If we want to talk in terms of the diameter, we get
$$
\mu(D)=D\,\int_{-1}^1\frac1{\sqrt{1-x^2}}\,dx.
$$
If follows that the quotient $\mu(D)/D$ is a constant, that we name $\pi$, and is equal to
$$
\pi=\int_{-1}^1\frac1{\sqrt{1-x^2}}\,dx.
$$
If you didn't know anything else about $\pi$, you could now use approximations of the integral to calculate approximations of $\pi$.
For better convergence of the Riemann sums, one can easily show (via integration by parts) that
$$
\int_{-1}^1\frac1{\sqrt{1-x^2}}\,dx=2\int_{-1}^1{\sqrt{1-x^2}}\,dx
$$
(which in particular also shows that $\pi$ is the area of the unit disk)