Multicomponent velocity analysis with quaternions