Volume of a rotated regular polygon

755 Views Asked by At

I want to calculate the volume of the shape which is created when you rotate a regular $n$-sided polygon around the $y$ axis with a major radius $r$. (like a torus, but with a polygon as rotated surface)
Area of the polygon: $$A = ns^2\frac{\cot(\pi/n)}{4}$$ Where $s$ is the length of one side and $n$ is the number of sides.

From Wikipedia I know that the volume of any rotated figure is: $$V = \pi\int_a^b\left({\left[R_O(x)\right]}^2-{\left[R_I(x)\right]}^2\right)\mathrm{d}x$$

How can I combine these two functions?