Four. (20 points) Given that $a$ and $b$ are non-zero constants, and the variable $\theta$ satisfies the inequality system
$$
\left\{\begin{array}{l}
a \sin \theta + b \cos \theta \geqslant 0, \\
a \cos \theta - b \sin \theta \geqslant 0 .
\end{array}\right.
$$

Try to find the maximum value of $\sin \theta$.
Let $x=\cos \theta, y=\sin \theta$. The constraint conditions are transformed into
$$
\left\{\begin{array}{l}
b x+a y \geqslant 0, \\
a x-b y \geqslant 0, \\
x^{2}+y^{2}=1 .
\end{array}\right.
$$

Thus, the problem is transformed into:
Finding the maximum value of the y-coordinate of points in the unit circle (3) within regions (1) and (2).
Below, we discuss 4 cases.
(1) $a>0, b>0$.
In this case, the constraint conditions describe the arc of the circle shaded in Figure 2.

Clearly, the y-coordinate of the intersection point of the line $a x - b y = 0$ with the unit circle is the required maximum value. Calculation yields
$$
y_{\max }=\frac{a}{\sqrt{a^{2}+b^{2}}} .
$$
(2) $a>0, b<0$. Similarly to (1), we get

When $a \leqslant -b$, $y_{\max }=-\frac{b}{\sqrt{a^{2}+b^{2}}}$;
When $a > -b$, $y_{\text {max }}=\frac{a}{\sqrt{a^{2}+b^{2}}}$.