12. A moving point starts from the origin and first moves along the positive x-axis. After completing each unit length, it turns left by an angle $\theta$. What is the distance from the origin when this moving point has completed $n$ unit lengths?
12. If for every unit length traversed by a moving point, a vector is made in the direction of the moving point's motion:
$$
\begin{array}{l}
\text { let } \overrightarrow{O Z_{1}}=\cos 0+i \sin 0, \vec{Z}_{1} Z_{2}=e^{i \theta}, \vec{Z}_{2} Z_{3}=e^{i Z \theta}, \cdots, \vec{Z}_{n-1} Z_{n}=e^{i(n-1) \theta}, \text { then } \overrightarrow{O Z_{n}}=\overrightarrow{O Z_{1}} \\
+\vec{Z}_{1} \vec{Z}_{2}+\vec{Z}_{2} Z_{3}+\cdots+\vec{Z}_{n-1} Z_{n}=\frac{1-\left(e^{i \theta}\right)^{n}}{1-e^{i \theta}} \\
=\frac{2 \sin \frac{n \theta}{2}\left(\sin \frac{n \theta}{2}-i \cos \frac{n \theta}{2}\right)}{2 \sin \frac{\theta}{2}\left(\sin \frac{\theta}{2}-i \cos \frac{\theta}{2}\right)} . \text { Thus, } \\
\left|\overrightarrow{O Z}_{n}\right|=\left|\frac{\sin \frac{n \theta}{2}}{\sin \frac{\theta}{2}}\right| .
\end{array}
$$