Unit 2, section 2.1.4

Why angle here is taken theta/2? image attached


This is due to the fact that we are converting from euler to quaternions. Have a look at this source: Maths - Conversion Euler to Quaternion - Martin Baker

But the basic idea is that we have euler angles and using quaterions, the conversion is done that way.

Thanks for sharing link.