3. If the circle $x^{2}+y^{2}=k^{2}$ covers at least one maximum point and one minimum point of the function $f(x)$ $=\sqrt{3} \sin \frac{\pi x}{k}$, then the range of $k$ is ( ).
(A) $|k| \geqslant 3$
(B) $|k| \geqslant 2$
(C) $|k| \geqslant 1$
(D) $1 \leqslant|k| \leqslant 2$
3. (B).
$\because f(x)=\sqrt{3} \sin \frac{\pi x}{k}$ is an odd function, the graph is symmetric about the origin,
$\therefore$ the circle $x^{2}+y^{2}=k^{2}$ only needs to cover one of the extreme points of $f(x)$.

Let $\frac{\pi x}{k}=\frac{\pi}{2}$, solving gives the nearest maximum point $P\left(\frac{k}{2}, \sqrt{3}\right)$ to the origin. From the problem, $k^{2} \geqslant\left(\frac{k}{2}\right)^{2}+(\sqrt{3})^{2}$, we get $|k| \geqslant 2$.