0
$\begingroup$

How can I save a 3D graph as a gif image?

g = GraphPlot3D[{1 -> 2, 1 -> 3, 1 -> 4, 1 -> 5, 2 -> 3, 2 -> 4, 2 -> 5, 2 -> 6, 2 -> 7, 2 -> 8, 3 -> 6, 5 -> 6, 5 -> 7, 4 -> 7, 4 -> 8, 3 -> 8, 6 -> 9, 7 -> 9, 8 -> 9, 2 -> 9}, EdgeRenderingFunction -> (Cylinder[#1, .05] &), VertexRenderingFunction -> ({ColorData["Atoms"][ RandomInteger[{1, 117}]], Sphere[#1, .15]} &), PlotStyle -> Directive[Specularity[White, 20]], Boxed -> False]; center = Mean /@ (PlotRange /. AbsoluteOptions[g, PlotRange]) n1 = DynamicModule[{\[Theta]}, DynamicWrapper[ MapAt[GeometricTransformation[#, RotationTransform[Dynamic[\[Theta]], {0, 0, 1}, center]] &, g, 1], \[Theta] = Clock[{0, 2 \[Pi], .01}, 10]]] 

enter image description here

$\endgroup$
2
  • 2
    $\begingroup$ maybe num = 20; table = Table[MapAt[GeometricTransformation[#, RotationTransform[t , {0, 0, 1}, center]] &, g, 1], {t , 0, 2 Pi, 2 Pi / num}]; Export["anim.gif", table]? $\endgroup$ Commented Dec 20, 2017 at 21:49
  • $\begingroup$ Linked topic should be enough to get this done but let me know if you disagree with marking it a duplicate. $\endgroup$ Commented Dec 21, 2017 at 8:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.