3. Let the function
$$
\begin{array}{l}
f(x, y) \\
=\sqrt{x^{2}+y^{2}-6 y+9}+\sqrt{x^{2}+y^{2}+2 \sqrt{3} x+3}+ \\
\quad \sqrt{x^{2}+y^{2}-2 \sqrt{3} x+3} .
\end{array}
$$

Then the minimum value of $f(x, y)$ is ( ).
(A) $3+2 \sqrt{3}$
(B) $2 \sqrt{3}+2$
(C) 6
(D) 8
3. C.
$$
\begin{array}{l}
\text { Let } A(0,3), B(-\sqrt{3}, 0), C(\sqrt{3}, 0) \text {, } \\
D(0,1), P(x, y) \text {. }
\end{array}
$$

Then \( f(x, y) = |PA| + |PB| + |PC| \).
Notice that,
$$
\angle ADB = \angle BDC = \angle CDA = 120^{\circ} \text {. }
$$

Thus, \( D \) is the Fermat point of \( \triangle ABC \).
Therefore, the minimum value of \( f(x, y) \) is achieved when point \( P \) is \( D \), and the minimum value is
$$
|DA| + |DB| + |DC| = 6 \text {. }
$$