The cosine of the angle a vector \( \vec{v} \) makes with the standard basis vectors \( \hat{i}, \hat{j}, \) and \( \hat{k} \) is related to its components. For \( \vec{v} \) normalized, the directional cosines are given by:
\[
\cos(\frac{\pi}{3}) = \frac{1}{2}, \quad \cos(\frac{\pi}{4}) = \frac{1}{\sqrt{2}}, \quad \cos(\gamma)
\]
The sum of the squares of these cosines for a normalized vector equals 1:
\[
\left(\frac{1}{2}\right)^2 + \left(\frac{1}{\sqrt{2}}\right)^2 + \cos^2(\gamma) = 1
\]
\[
\frac{1}{4} + \frac{1}{2} + \cos^2(\gamma) = 1
\]
\[
\cos^2(\gamma) = 1 - \frac{3}{4} = \frac{1}{4}
\]
\[
\cos(\gamma) = \pm \frac{1}{2}
\]
Given that \( \gamma \) is in the interval \( \left( \frac{\pi}{2}, \pi \right) \), the cosine function is negative in this range, so:
\[
\cos(\gamma) = -\frac{1}{2}
\]
Thus, \( \gamma = \frac{2\pi}{3} \).