Let $\theta \in\left(0, \frac{\pi}{2}\right)$. If the system of linear equations
$$
\begin{aligned}
& \left(1+\cos ^2 \theta\right) x+\sin ^2 \theta y+4 \sin 3 \theta z=0 \\
& \cos ^2 \theta x+\left(1+\sin ^2 \theta\right) y+4 \sin 3 \theta z=0 \\
& \cos ^2 \theta x+\sin ^2 \theta y+(1+4 \sin 3 \theta) z=0
\end{aligned}
$$
has a non-trivial solution, then the value of $\theta$ is :