The generalized joint spectral radius. A geometric approach