Effective backward kinematics for a 6r painting robot