0

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]
   ]
]
  • 2
    Don't use Dynamic constructs. Try making a list (table) of images from your geometric transform and exporting the list as a GIF. – m_goldberg Sep 16 '16 at 01:06
  • Analogously to How to Export this animation as a gif, is that enough? – Kuba Sep 16 '16 at 05:52
  • 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. – Franco Di Rino Sep 16 '16 at 13:58
  • 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? – jibe Sep 16 '16 at 14:03
  • I have already changed it – Franco Di Rino Sep 16 '16 at 14:25
  • Then use ViewVector -> {2.5 {Cos@t, Sin@t, 1}, {0, 0, 0}} like in 46359 – Kuba Sep 16 '16 at 14:36
  • I want the gif image from the same angle and the same rotational axis I get from my lines. I tried with ViewVector but the view is too far and the graphic loose a lot of quality. Besides i could create an AVI video but not a gif. – Franco Di Rino Sep 16 '16 at 15:10
  • "The matter here is that i don't use any parameter," - what is theta then? – Kuba Sep 16 '16 at 15:47
  • It's true, but theta is a parameter i added for making the graphic rotate. Is not a parameter of any variable of the graphic because the graphic is just a vector field. I have tried to make an analogy between what you have linked and my problem and i have failed. – Franco Di Rino Sep 16 '16 at 16:01
  • I will take the dynamicmodule part off and re formulate the question. I want to get a gif image of this graphic rotating

    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]

    – Franco Di Rino Sep 16 '16 at 16:08

0 Answers0