Example 8 (1996 National High School Mathematics League Question) Find the range of real numbers $a$ such that for any $\theta \in\left[0, \frac{\pi}{2}\right]$, it always holds that
$$
(x+3+2 \sin \theta \cos \theta)^{2}+(x+a \sin \theta+a \cos \theta)^{2} \geqslant \frac{1}{8}
$$
Let $y=x$, then 
\[
\left\{\begin{array}{l}
x-y=0, \\ 
{[x-(-3-2 \sin \theta \cos \theta)]^{2}+[y-(-a \sin \theta-a \cos \theta)]^{2} \geqslant-\frac{1}{8} .}
\end{array}\right.
\]
This problem can be solved by using analytical geometry, transforming it into the square of the distance from the point $(-3-2 \sin \theta \cos \theta, -a \sin \theta - a \cos \theta)$ to the line $y=x$ being greater than $\frac{1}{8}$. Using the distance formula, we get $|-3-2 \sin \theta \cos \theta + a \sin \theta + a \sin \theta| \geqslant \frac{1}{2}$. Let $t = \sin \theta + \cos \theta = \sqrt{2} \sin \left(\theta + \frac{\pi}{4}\right) \in [1, \sqrt{2}]$, the original inequality can be transformed into $1 - 3 - 2(t^2 - 1) + at \left\lvert \, \geqslant \frac{1}{2}\right.$. Then, we can find that $a \geqslant \frac{7}{2}$ or $a \leqslant \sqrt{6}$.