Example 2. $P$ is a moving point on the fixed circle $(x-a)^{2}+y^{2}=r^{2}$, and $O$ is the origin. An equilateral triangle $O P Q(O P Q$ are arranged in a counterclockwise direction) is constructed with $O P$ as one side. Find the equation of the trajectory of point $Q$.
Let $P\left(x_{0}, y_{0}\right), Q(x, y)$, the complex number corresponding to vector $\overrightarrow{O Q}$ is $x+y i$, and the complex number corresponding to vector $\overrightarrow{O P}$ is $x_{0}+y_{0} i$. By the knowledge of complex number rotation, we have
$$
x+y i=\left(x_{0}+y_{0} i\right)\left(\cos \frac{\pi}{3}+i \sin \frac{\pi}{3}\right),
$$

which means
$$
\begin{aligned}
x_{0}+ & y_{0} i=(x+y i)\left[\cos \left(-\frac{\pi}{3}\right)\right. \\
+ & \left.i \sin \left(-\frac{\pi}{3}\right)\right] .
\end{aligned}
$$

Simplifying, we get $x_{0}+y_{0} i=\left(\frac{1}{2} x+\frac{\sqrt{3}}{2} y\right)$
$$
+\left(\frac{1}{2} y-\frac{\sqrt{3}}{2} x\right) i \text {. }
$$

By the condition for equality of two complex numbers, we have
$$
\begin{array}{l}
x_{0}=\frac{1}{2} x+\frac{\sqrt{3}}{2} y, \\
y_{0}=\frac{1}{2} y-\frac{\sqrt{3}}{2} x .
\end{array}
$$
Since $P\left(x_{0}, y_{0}\right)$ is on a fixed circle,
$$
\therefore\left(x_{0}-a\right)^{2}+y_{0}^{2}=r^{2} \text {. }
$$

Substituting, we get $\quad\left(\frac{1}{2} x+\frac{\sqrt{3}}{2} y-a\right)^{2}$
$$
+\left(\frac{1}{2} y-\frac{\sqrt{3}}{2} x\right)^{2}=r^{2}
$$

Simplifying, we get $\quad\left(x-\frac{a}{2}\right)^{2}$
$$
+\left(y-\frac{\sqrt{3}}{2} a\right)^{2}=r^{2} .
$$