function creparametrize_refine_model(x,ce,cc,target_num_CP)
global ini_Val

%Initialization
nn=ini_Val.ncontrol;
N=(nn-1)*20;
gaussp=linspace(0,1,N);
n_sample_fit=(nn-1)*8;

Invariant_sample_bis = precal_generic(gaussp); 

[C,C1,C2] = interpolate(Invariant_sample_bis,x);

au = sqrt(C1(:,1).^2 + C1(:,2).^2);

arclength=zeros(size(gaussp));
arclength(1)=0;
for i=2:length(au)
    arclength(i)=arclength(i-1) + (au(i-1)+au(i))/2*Invariant_sample_bis.gweight;
end

%*------Concentration Parameters-------
%---------------------------------------
k= cc*(abs(C1(:,1).*C2(:,2)-C2(:,1).*C1(:,2))./(C1(:,1).^2 + C1(:,2).^2)).^ce+1;
g=zeros(size(gaussp));
for i=2:length(g)
    g(i)=g(i-1) + (k(i-1)+k(i))/2*Invariant_sample_bis.gweight;
end

nn = target_num_CP;
ini_Val.ncontrol=nn;


arcl_equi=linspace(0,g(end),(nn-2));
for i=2:nn-3
    [val, index]=min(abs(g-arcl_equi(i)));
    if g(index)>=arcl_equi(i)
        index=index-1;
    end
    
    uc(i)=(arcl_equi(i)*(gaussp(index+1)-gaussp(index)) + ...
    gaussp(index)*g(index+1) - gaussp(index+1)*g(index)) ...
    / (g(index+1)-g(index));
end
uc(nn-2)=1;

ini_Val.U = [0 0 0 uc 1 1 1];
precal_gauss;

