#!/usr/bin/env wolframscript -local (* ::Package:: *) animationFileName="animation.gif"; Import["ptrc_one_sample_vis-2d.wls"] constString="Maximum of sensors uncertainty: "<>ToString[dat[unc]]<> "; Final error: "<>ToString[dat[error]]<>";\n"; startPoint=Table[Graphics[{Thickness[Medium], Inset[Style["\[CircleTimes]",20],rts[[i,1]][P]]},ImageSize->inhSize], {i,1,Length[rts]}]; listOfGraphsAnim=Flatten[{ Labeled[Show[heatMapGraph,centersGraph,realPointGraph,circlesGraph], constString<>"Start point #1"], Flatten[Table[{ Labeled[ Show[heatMapGraph,centersGraph,realPointGraph,circlesGraph, startPoint[[i]],bestGuessGraph], constString<>"Start point #"<>ToString[i]], Flatten[Table[ Labeled[ Show[heatMapGraph,centersGraph,realPointGraph,circlesGraph, startPoint[[i]],bestGuessGraph, Graphics[{Thickness[Medium],Black,Line[{ Table[rts[[i]][[k]][P],{k,1,j}]}]}]], constString<>"Start point #"<>ToString[i]<> "; Step #"<>ToString[j]],{j,1,Length[rts[[i]]]}]], Labeled[ Show[heatMapGraph,centersGraph,realPointGraph,circlesGraph, startPoint[[i]],bestGuessGraph, Flatten[Table[ Graphics[{Thickness[Medium],Black, Line[{Table[rts[[i]][[k]][P],{k,1,j}]}]}], {j,1,Length[rts[[i]]]}]], Graphics[{ {Thickness[Medium],Black, Circle[rts[[i,Length[rts[[i]]]]][P],0.05]}, {Thickness[Large],Black, Point[rts[[i,Length[rts[[i]]]]][P]]}}]], constString<>"Start point #"<>ToString[i]]}, {i,1,Length[rts]}]]}]; durations=Flatten[{1, Flatten[{Table[{1,Table[0.2,{j,1,Length[rts[[i]]]}],2},{i,1,Length[rts]}]}]}]; Export[animationFileName,listOfGraphsAnim,"DisplayDurations"->durations, "AnimationRepetitions" -> ∞,OverwriteTarget->"KeepBoth"]