Example 8. As shown in Figure 8, a ray passing through the origin intersects the circle $x^{2}+(y-1)^{2}=1$ at point $Q$. On the ray $O Q$, find a point $P$ such that the distance from $P$ to the line $y=2$ equals $|P Q|$. When this ray rotates around the origin, find the equation of the trajectory of point $P$.
Let the equation of the ray be
$$
\left\{\begin{array}{l}
x=t \cos \theta, \\
y=t \sin \theta .
\end{array}(0 \leqslant \theta < 2\pi, \quad t \geqslant 0)\right.
$$
When the ray intersects the line $y=2$, we have
$$
t \sin \theta=2, \quad \therefore t_{1}=\frac{2}{\sin \theta} .
$$
When the ray intersects the circle $x^{2}+y^{2}=4$, we have
$$
t^{2} \cos ^{2} \theta+t^{2} \sin ^{2} \theta=4, \quad \therefore t_{0}=2 .
$$
Since $t_{0}>0$, we have $|O P|=t_{0}$. 
Also, $|P Q|=\left|t_{0}-t_{1}\right|=\left|t_{0}-2 \sin \theta\right|$,
The distance from point $P$ to the line $y=2$ is $\left|t_{0} \sin \theta-2\right|$. By the given condition, $\left|t_{0}-2 \sin \theta\right|=\left|t_{0} \sin \theta-2\right|$, thus $\left(t_{0}^{2}-4\right) \cos ^{2} \theta=0$, which implies $t_{0}=2$ or $\cos \theta=0$, $\sin \theta=1$.
(ii) As $\theta$ varies, the trajectory of point $P$ is given by
Eliminating the parameter, the ordinary equation of the curve is the upper half of the circle $x^{2}+y^{2}=4$ and the ray $x=0(y>0)$.