Example 2 Bivariate function
$$
\begin{array}{l}
f(x, y) \\
=\sqrt{x^{2}+y^{2}}+\sqrt{x^{2}-2 x+10}+\sqrt{y^{2}-4 y+5}(x \leqslant 1)
\end{array}
$$

The minimum value of the function is $\qquad$
Solve As shown in Figure 2, let $A(x, 0)(x \leqslant-1), B(0, y)$, $C(1,-3), D(1,2)$. Then
$$
\begin{array}{l}
f(x, y)=|A B|+|A C|+|B D| \\
=(|A B|+|B D|)+|A C| \\
\geqslant|A D|+|A C|,
\end{array}
$$

Equality holds if and only if points $A$, $B$, and $D$ are collinear, i.e.,
$$
\frac{y}{0-x}=\frac{2}{1-x} \Rightarrow y=\frac{2 x}{x-1}
$$

From the graph, we know
$$
\begin{array}{l}
|A D| \geqslant\left|A_{0} D\right|=2 \sqrt{2}, \\
|A C| \geqslant\left|A_{0} C\right|=\sqrt{13} .
\end{array}
$$

Therefore, $f(x, y) \geqslant 2 \sqrt{2}+\sqrt{13}$.
When $x=-1, y=1$, the equality holds.