Semianalytical models of sprite formation from plasma inhomogeneities