Solving kinematic problems by population coding in recurrent networks