Example 6 Let $n$ be a positive integer. Calculate
$$
P=\prod_{k=0}^{n-1} \sin \left(\theta+\frac{k \pi}{n}\right) .
$$
Notice that, $\frac{2 k \pi}{n}(k=0,1, \cdots, n-1)$ form the $n$ angles of the $n$-th roots of unity. Therefore, consider constructing a function related to these roots.
Let $\varepsilon_{k}=\cos \frac{2 k \pi}{n}+\mathrm{i} \sin \frac{2 k \pi}{n}(k=0,1, \cdots, n-1)$.
Then $\prod_{i=0}^{n-1}\left(x-\varepsilon_{i}\right)=x^{n}-1$
$\Rightarrow \prod_{i=0}^{n-1}\left(1-\frac{\varepsilon_{i}}{x}\right)=1-\frac{1}{x^{n}}$.
If we take $x=\cos (-2 \theta)+\mathrm{i} \sin (-2 \theta)$, then equation (2) becomes
$$
\begin{array}{l}
\prod_{k=0}^{n-1}\left(1-\cos \left(2 \theta+\frac{2 k \pi}{n}\right)-\mathrm{i} \sin \left(2 \theta+\frac{2 k \pi}{n}\right)\right) \\
=1-\cos 2 n \theta-\mathrm{i} \sin 2 n \theta .
\end{array}
$$

Also, $1-\cos \left(2 \theta+\frac{2 k \pi}{n}\right)-\mathrm{i} \sin \left(2 \theta+\frac{2 k \pi}{n}\right)$
$=2 \sin ^{2}\left(\theta+\frac{k \pi}{n}\right)-\mathrm{i} \cdot 2 \cos \left(\theta+\frac{k \pi}{n}\right) \cdot \sin \left(\theta+\frac{k \pi}{n}\right)$
$=2 \sin \left(\theta+\frac{k \pi}{n}\right)\left(\sin \left(\theta+\frac{k \pi}{n}\right)-\mathrm{i} \cos \left(\theta+\frac{k \pi}{n}\right)\right)$
$=2 \sin \left(\theta+\frac{h \pi}{n}\right)(-i)\left(\cos \left(\theta+\frac{h \pi}{n}\right)+i \sin \left(\theta+\frac{h \pi}{n}\right)\right)$,
so the left side of equation (3)
$$
\begin{array}{l}
= 2^{n}(-\mathrm{i})^{n} \prod_{k=0}^{n-1} \sin \left(\theta+\frac{k \pi}{n}\right) \cdot \\
\prod_{k=0}^{n-1}\left(\cos \left(\theta+\frac{k \pi}{n}\right)+\mathrm{i} \sin \left(\theta+\frac{k \pi}{n}\right)\right) \\
= 2^{n} P(-\mathrm{i})^{n}\left(\cos \left(n \theta+\frac{(n-1) \pi}{2}\right)+\right. \\
\left.\mathrm{i} \sin \left(n \theta+\frac{(n-1) \pi}{2}\right)\right) \\
= 2^{n} P(-\mathrm{i})^{n}\left(\cos \left(\theta+\frac{\pi}{2}-\frac{\pi}{2 n}\right)+\mathrm{i} \sin \left(\theta+\frac{\pi}{2}-\frac{\pi}{2 n}\right)\right)^{n} \\
= 2^{n} P(-\mathrm{i})^{n}\left(\sin \left(\frac{\pi}{2 n}-\theta\right)+\mathrm{i} \cos \left(\frac{\pi}{2 n}-\theta\right)\right)^{n} \\
= 2^{n} P(-\mathrm{i})^{n}\left(-\sin \left(\theta-\frac{\pi}{2 n}\right)+\mathrm{i} \cos \left(\theta-\frac{\pi}{2 n}\right)\right)^{n} \\
= 2^{n} P\left(\cos \left(\theta-\frac{\pi}{2 n}\right)+\mathrm{i} \sin \left(\theta-\frac{\pi}{2 n}\right)\right)^{n} \\
= 2^{n} P\left(\cos \left(n \theta-\frac{\pi}{2}\right)+\mathrm{i} \sin \left(n \theta-\frac{\pi}{2}\right)\right) \\
= 2^{n} P(\sin n \theta-\mathrm{i} \cos n \theta), \\
\text { The right side of equation (3) }=1-\cos 2 n \theta-\mathrm{i} \sin 2 n \theta \\
= 2 \sin n \theta \cdot(\sin n \theta-\mathrm{i} \cos n \theta) .
\end{array}
$$

The right side of equation (3) $=1-\cos 2 n \theta-\mathrm{i} \sin 2 n \theta$

Thus, equation (3) becomes
$$
\begin{array}{l}
2^{n} P(\sin n \theta-\mathrm{i} \cos n \theta) \\
=2 \sin n \theta \cdot(\sin n \theta-\mathrm{i} \cos n \theta) .
\end{array}
$$

Therefore, $P=\frac{\sin n \theta}{2^{n-1}}$.