Example 6 Given the complex numbers $z_{1}=\frac{\cos x^{2}}{\sin y^{2}}+\mathrm{i} \cdot \frac{\cos y^{2}}{\sin x^{2}}, z_{2}=x+y i(x, y \in \mathbf{R})$. If when $x, y$ take all real numbers in the interval $\left[-\sqrt{\frac{\pi}{2}}, \sqrt{\frac{\pi}{2}}\right]$, $\left|z_{1}\right|$ is always equal to $\sqrt{2}$. Try to find the maximum and minimum values of $\left|z_{1}-z_{2}\right|$.
Analyze the trajectories of the corresponding points of $z_{1}, z_{2}$.
Solution: According to the problem, for any $x^{2}, y^{2} \in\left[0, \frac{\pi}{2}\right]$, we always have $\left(\frac{\cos x^{2}}{\sin y^{2}}\right)^{2}+\left(\frac{\cos y^{2}}{\sin x^{2}}\right)^{2}=2$.
If $x^{2}+y^{2}>\frac{\pi}{2}$, then $\frac{\pi}{2} \geqslant x^{2}>\frac{\pi}{2}-y^{2} \geqslant 0$, thus $0 \leqslant \cos x^{2}2$, which also contradicts equation (1).
Therefore, for any $x^{2}, y^{2} \in\left[0, \frac{\pi}{2}\right]$, we have $x^{2}+y^{2}=\frac{\pi}{2}$, hence $z_{1}=1+\mathrm{i}$. Thus, the trajectory of $z_{1}$ represents only the point $Z_{1}(1,1)$, and the trajectory of $z_{2}$ represents a circle centered at the origin with a radius of $\sqrt{\frac{\pi}{2}}$.

According to Figure 2-4, it is easy to find that when $z_{2}=\sqrt{\frac{\pi}{2}} e^{\frac{\pi}{4}}=\frac{\sqrt{\pi}}{2}(1+\mathrm{i})$, $\left|z_{1}-z_{2}\right|$ has the minimum value $\sqrt{2}-\sqrt{\frac{\pi}{2}}$; when $z_{2}=\frac{\sqrt{\pi}}{2}(1-\mathrm{i})$, $\left|z_{1}-z_{2}\right|$ has the maximum value $\sqrt{2}+\sqrt{\frac{\pi}{2}}$.