I am running an animation with the following command:
files = FileNames[NotebookDirectory[] <> "*.dat"];
MTnumbers = FileNames[NotebookDirectory[] <> "MTnumbers.txt"];
data = Import[#, "Table"] & /@ files
MT = Import[#, "List"] & /@ MTnumbers
coords = {{#1 - (#3/2), #2 - (height/2)}, {#1 + (#3/2), #2 + (height/
2)}} & @@@ #[[All, 2 ;;]] & /@ data;
height = 2;
colors = {Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue,
Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue,
Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue,
Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue};
Animate[Graphics[{Sequence @@ {colors[[#]],
Rectangle @@ (coords[[#]][[t]])} & /@ MT[[1]]},
PlotRange -> {{-1000, 1000}, {-200, 200}},
ImageSize -> {1000, 200}], {t, Range[0, 7000]}]
Export["tubuli.avi", %];
As soon as I try to export this output Mathematica crashes. When I increase the number of rectangles to about 150 the simulation crashes without giving an output. Is my computer too weak or am I doing something wrong?
EDIT:
The data is in the following zip archive you just need the notebook and the data in the same folder and it should work.
coords
andMT
. You can put them on pastebin so Mathematica canImport
them. If not, you can paste them here and I will put them on pastebin. $\endgroup$