#-- Generate the .svg files for the animation
#-- Animation: variation of the shape of the serpenoid
#--  curver when the k parameter is changed from 0
#--  to 20

for k = [0.5:0.25:2.75]
  [x,y]=serp(70,k,1,0);
  plot(x,y);
  axis([0,0.8,-0.4,0.4])
  axis equal; axis off;
  name = strcat("serp_k/k_",num2str(k),".svg");
  print(name, "-dsvg");
endfor

for k = [3:0.5:5.5]
  [x,y]=serp(70,k,1,0);
  plot(x,y);
  axis([0,0.8,-0.4,0.4])
  axis equal; axis off;
  name = strcat("serp_k/k_",num2str(k),".svg");
  print(name, "-dsvg");
endfor

for k = [6:1:20]
  [x,y]=serp(70,k,1,0);
  plot(x,y);
  axis([0,0.8,-0.4,0.4])
  axis equal; axis off;
  name = strcat("serp_k/k_",int2str(k),".svg");
  print(name, "-dsvg");
endfor








