function plot_arc_length(x)
global ini_Val 

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

[C,C1,C2] = interpolate(Invariant_sample_bis,x);
au = (C1(:,1).^2 + C1(:,2).^2);
au = sqrt(au);

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

figure
plot(gaussp, arclength,'k-')

