I'm so confused. The article you wrote says that you fix gimbal lock by using quaternion rotation, quote:
>To fix gimbal lock, we must avoid modelling this physical gimbal system.
> In 3D, instead of using 3 fixed angles that we multiply together to get the final rotation, we will:
> 1. Construct a quaternion that describes a rotation around whatever axis we want, and the angle to rotate by.