function param = toParam(base, kexp, scenter, pcenter, pmin, pmax, slider)
	
	if ((pcenter < pmin) || (pcenter > pmax))
	    pcenter = pmax*scenter + pmin*(1-scenter);
    end

    for i=1:length(slider),
    	s = min(1, max(0, slider(i)));
        
        if (s < scenter)
            if (base == 1)
                p = pcenter-(pcenter-pmin)*(scenter-s)/scenter;
                % p = pcenter-(pcenter-pmin)*(scenter-s)/scenter;
            else
                p = pcenter-(pcenter-pmin)*(base^(kexp*(scenter-s)/scenter)-1)/(base^kexp-1);
                % p = pcenter-(pcenter-pmin)*(pow(base,kexp*(scenter-s)/scenter)-1)/(pow(base,kexp)-1);
            end
        else
            if (base == 1)
                p = pcenter+(pmax-pcenter)*(-scenter+s)/(1-scenter);
                % p = pcenter+(pmax-pcenter)*(-scenter+s)/(1-scenter);
            else
                p = pcenter+(pmax-pcenter)*(base^(kexp*(-scenter+s)/(1-scenter))-1)/(base^kexp-1);
                % p = pcenter+(pmax-pcenter)*(pow(base,kexp*(-scenter+s)/(1-scenter))-1)/(pow(base,kexp)-1);
            end;
        end
        param(i) = p;
    end
