# Volume of a rotated regular polygon

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?

• The volume will also depend on the orientation of the polygon. Without loss of generality we may suppose the centre of the polygon is on the $x$-axis. But a small rotation about the centre before rotating about the $y$-axis may change the volume. – André Nicolas Aug 14 '14 at 23:14
• If you know where the centroid of the polygon is and the polygon doesn't intersect the rotation axis, you can simply apply Pappus' centorid theorem to get the volume: $V = 2\pi Ar$ where $V$ is the volume, $A$ is the area of the polygon and $r$ is the distance between the centroid and the rotation axis. – achille hui Aug 14 '14 at 23:23