Let $P$ be a regular nonagon with side length $2,$ and let $S$ be the set of points that are within a distance of $1$ from $P.$ (That is, a point $X$ is in $S$ if there exists a point $Y$ in $P$ such that $XY \le 1.$) What is the perimeter of $S?$
Let Q be the center of the nonagon. Since P is regular, the distance between any two adjacent vertices of P is sqrt(2^2+2^2)=sqrt(8). Therefore, the distance between Q and any vertex of P is sqrt(sqrt(8)^2−2^2) = 2. Thus, the distance between Q and any point in S is ≤1, so S is a regular hexagon centered at Q with side length 1. Therefore, the perimeter of S is 6⋅1=6.