Example 5. Given $z \in C,|z|=1$. Try to find the maximum and minimum values of $r=\left|z^{3}-3 z-2\right|$.
Analysis:
$$
\begin{array}{l}
r=\left|z^{3}-3 z-2 z \bar{z}\right| \\
=|z|\left|z^{2}-2 \bar{z}-3\right| \\
\quad=\left|z^{2}-2 \bar{z}-3\right|
\end{array}
$$
$$
\begin{array}{l}
\text { Let } z=\cos \theta+i \sin \theta, \\
r=1(\cos 2 \theta-2 \cos \theta-3)+(\sin 2 \theta \\
+2 \sin \theta) i \mid \text {. } \\
\text { Let }\left\{\begin{array}{l}
x=\cos 2 \theta-2 \cos \theta-3, \\
y=\sin 2 \theta+2 \sin \theta
\end{array}\right. \\
\Rightarrow(x+3)^{2}+y^{2}=5-4 \cos 3 \theta, \\
1 \leqslant(x+3)^{2}+y^{2} \leqslant 9 \text {. } \\
\end{array}
$$

Since $x=\cos 2 \theta-2 \cos \theta-3$
$$
\begin{aligned}
= & 2 \cos ^{2} \theta-2 \cos \theta-4 \\
= & 2\left(\cos \theta-\frac{1}{2}\right)^{2}-\frac{9}{2} .
\end{aligned}
$$

Draw the graph (as shown in Figure 4).
From the graph, we have
$$
\Rightarrow-\frac{9}{2} \leqslant x \leqslant 0 .
$$

Given $1 \leqslant(x+3)^{2}+y^{2} \leqslant 9$, we can draw the set of points for the complex number $x+y i$ (as shown in Figure 5).
From Figure 5, it is not difficult to see that
$$
\begin{array}{l}
\text { When } x=0 \Rightarrow z=-1, \text { then } r_{\mathrm{min}}=0; \\
\text { When } x=-\frac{9}{2} \Rightarrow z=\cos \frac{\pi}{3}+i \sin \frac{\pi}{3}, \text { then } \\
\quad r_{\mathrm{max}}=3 \sqrt{3} .
\end{array}
$$