0
$\begingroup$

I want to make a GIF of the image that I get from these lines. (It should be a vector field with the shape of a cylinder). I added the command DynamicModule for getting a clip but I wasn't able to create a GIF image.

Can anybody help me?

The file data is here: http://pastebin.com/raw/rjM2i5Jt.

table = Import["http://pastebin.com/raw/rjM2i5Jt", "Table", "IgnoreEmptyLines" -> True];

X = table[[;; , ;; 3]];
V = table[[;; , 4 ;; 6]];

g = Graphics3D[{Arrowheads@.015, Arrow@Transpose[{X, X + .07 Normalize /@ V}]}, 
           BoxRatios -> {1, 1, 1}, PlotRange -> All, ViewPoint -> {1, 1, 1}, 
           ViewVertical -> {0, 1, 0}, Boxed -> False
];

center = Mean /@ (PlotRange /. AbsoluteOptions[g, PlotRange])

DynamicModule[{θ}, 
   DynamicWrapper[
      MapAt[
         GeometricTransformation[#, RotationTransform[Dynamic[θ], {0, 1, 1}, center]] &, 
         g, 
         1
      ], 
      θ = Clock[{0, 2 π, .01}, 10]
   ]
]
$\endgroup$
  • 2
    $\begingroup$ Don't use Dynamic constructs. Try making a list (table) of images from your geometric transform and exporting the list as a GIF. $\endgroup$ – m_goldberg Sep 16 '16 at 1:06
  • $\begingroup$ Analogously to How to Export this animation as a gif, is that enough? $\endgroup$ – Kuba Sep 16 '16 at 5:52
  • $\begingroup$ The matter here is that i don't use any parameter, i just want the graphic to rotate. and I don't know how to make a table. $\endgroup$ – Franco Di Rino Sep 16 '16 at 13:58
  • $\begingroup$ The first Import command does not seem to work for me. Could you correct it so that we can easily import your data and use the tables X and Y? $\endgroup$ – jibe Sep 16 '16 at 14:03
  • $\begingroup$ I have already changed it $\endgroup$ – Franco Di Rino Sep 16 '16 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.