ptrc_one_sample_vis-2d-anim.sce 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. animationFileName="animation.gif";
  2. exec("ptrc_one_sample_vis-2d.sce");
  3. convOptSring="";
  4. for i=1:1:length(rts)
  5. canvas(i); centres(); circles();
  6. bestGuessPoint(); realPointPoint();
  7. gw=gcf(); ax0=gw.children(1); ax0.filled="off";
  8. ax1=gw.children(2); ax1.filled="off";
  9. ax0.font_style=0;ax1.font_style=0;ax1.title.font_style=0;
  10. ax1.x_label.font_style=0;ax1.y_label.font_style=0;
  11. ax0.font_size=fontSize;ax1.font_size=fontSize;ax1.title.font_size=fontSize;
  12. ax1.x_label.font_size=fontSize;ax1.y_label.font_size=fontSize;
  13. xtitle([
  14. strcat(["Maximum of sensors uncertainty: ",string(dat.unc),";"]),
  15. strcat(["Number of known spheres: ",string(dat.n),";"]),
  16. strcat(["Final error: ",string(dat.error),";"]),
  17. strcat(["Start point #",string(i),"; Step #",string(0)])]);
  18. shotFileName=strcat(["shot_",string(i),"_",string(0),".gif"]);
  19. xs2gif(graphWindows(i),shotFileName);
  20. convOptSring=strcat([convOptSring" -delay 10/10 ",shotFileName]);
  21. startPoint(i);
  22. shotFileName=strcat(["shot_",string(i),"_",string(1),".gif"]);
  23. xs2gif(graphWindows(i),shotFileName);
  24. convOptSring=strcat([convOptSring," ",shotFileName," -delay 2/10"]);
  25. for j=1:1:length(rts(i).s)
  26. route(i,j);
  27. xtitle([
  28. strcat(["Maximum of sensors uncertainty: ",string(dat.unc),";"]),
  29. strcat(["Number of known spheres: ",string(dat.n),";"]),
  30. strcat(["Final error: ",string(dat.error),";"]),
  31. strcat(["Start point #",string(i),"; Step #",string(j)])]);
  32. shotFileName=strcat(["shot_",string(i),"_",string(j+1),".gif"])
  33. xs2gif(graphWindows(i),shotFileName);
  34. convOptSring=strcat([convOptSring," ",shotFileName]);
  35. end
  36. endPoint(i);
  37. shotFileName=strcat(["shot_",string(i),"_",string(j+2),".gif"])
  38. xs2gif(graphWindows(i),shotFileName);
  39. convOptSring=strcat([convOptSring," -delay 30/10 ",shotFileName]);
  40. end
  41. if getos()<>'Windows' then
  42. unix(strcat(["convert ",convOptSring," ",animationFileName]));
  43. unix(strcat(["rm shot_*_*.gif"]));
  44. else
  45. dos(strcat(["convert ",convOptSring," ",animationFileName]));
  46. dos(strcat(["del shot_*_*.gif"]));
  47. end