3.12. Given a plane convex figure with perimeter $2 p$ and area $S$. Consider the body consisting of points that are at a distance of no more than $d$ from this figure. Find the volume of this body.
3.12. Let's preliminarily assume that the given plane figure is a convex $n$-polygon. Then the considered body consists of a prism with volume $2 d S$, $n$ semi-cylinders with a total volume of $\pi p d^{2}$, and $n$ bodies from which a sphere with volume $4 \pi d^{3} / 3$ can be formed. Let's consider these last $n$ bodies in more detail. Consider a sphere of radius $d$ and cut it into semicircles (with centers at the center of the sphere), which are parallel to the bases of the semi-cylinders. This is the division of the sphere into $n$ bodies.

Thus, if the figure is a convex polygon, the volume of the body is $2 d S + \pi p d^{2} + 4 \pi d^{3} / 3$. This formula remains valid for any convex figure.