6 A circle $O$ with radius $x$ is inside a square with side length 1, touching (at least one) side of the square, and rolls around. After rolling around the square once, let the area of the region not covered by circle $O$ be $S$. The value of $x$ that minimizes $S$ is
A. $4-\pi$
B. $\frac{1}{4}$
C. $\frac{4}{20-\pi}$
D. $\frac{1}{2}$
6 C. When $0 \leqslant x<\frac{1}{4}$, the area $S$ of the four right angles and the small central square of the square is given by
$$
S=(20-\pi)\left(x-\frac{4}{20-\pi}\right)^{2}+\frac{4-\pi}{20-\pi} .
$$

When $\frac{1}{4} \leqslant x \leqslant \frac{1}{2}$, the area $S$ of the four corner regions is given by
$$
S=(4-\pi) x^{2} \text {. }
$$