# Using RotationTransform and Table

I created a small animation, very simple of course, that works very well.

Export["C:\\Users\\LMC\\Desktop\\Figure.gif",Flatten@@Table[Graphics[{Point[{0,0}],GeometricTransformation[Circle[{0,-20},2],RotationTransform[(50Sin[#-(3 π)/2]) Degree]]},PlotRange->{{20,-20},{-25,25}},Axes->True],1]&/@Range[0,10,0.05]] In the future I will create animations that I intend to subdivide using $r1$, $r2$, $r3$, $r4$ and $r5$. All with different characteristics, but all varying equally with Range [0,10,0.05].

I tried to do a test with a value $r1$ based on the successful animation above, but at the beginning, two problems arose.

Surely this must be something very simple and possibly this question can be a duplicate.

The first problem was that the starting position is not the same as that of the previous animation. I tried to make $r1$ as an "argument" for substitution.

The second problem was that all frames were the same.

r1=GeometricTransformation[Circle[{0,-20},2],RotationTransform[(50Sin[#-(3 π)/2]) Degree]];
Export["C:\\Users\\Leandro\\Desktop\\Figure.gif",Flatten@@Table[Graphics[{Point[{0,0}],r1},PlotRange->{{20,-20},{-25,25}},Axes->True],1]&/@Range[0,10,0.05]] I do not understand what might be wrong.

• What do you mean by $r1$ etc? What are you trying to achieve ultimately? Perhaps there's a more direct way. – MarcoB Dec 5 '16 at 17:55
• @MarcoB I intend to insert several "pendulums" with different frequencies. But using your answer I would like to advance using my attempts. You may already have the solution, but if I succeed, I will update the issue. – LCarvalho Dec 5 '16 at 18:17
• Excellent idea. Hope it helps. – MarcoB Dec 5 '16 at 20:01

I think this might be what you are after:

r1 = RotationTransform[(50 Sin[# - (3 Pi)/2]) Degree]&;

frames = Graphics[
{Point[{0, 0}],
GeometricTransformation[
Circle[{0, -20}, 2],
r1[#]
]
},
PlotRange -> {{20, -20}, {-25, 25}}, Axes -> True
]& /@ Range[0, 10, 0.05];


You can take a look at the result within Mathematica using ListAnimate:

ListAnimate[frames] 