# Animating magnetic field lines on a circle

So I want to create a changing vector as a function of theta and have it's origin stay on the path of a circle. The vector I want to plot is:

Manipulate[
Show[Graphics[
Arrow[{{Cos[t*3.6 °],
Sin[t*3.6 °]}, {-Sin[t*3.6 °],
Cos[t*3.6 °]}}*{Sin[t*3.6 °],
2 Cos[t*3.6 °]}]]], {t, 0, 100, .25}]


I apologize that I'm not very good at mathematica; I'm pretty new and trying to learn. I know how to make a circle, but I don't know how to make the vector go in a circle. Any tips or ideas?

Btw, I did this in terms of time and wanted one full circle in 100 minutes, hence the t*3.6 ° part.

Updated code below:

Manipulate[
Show[Graphics[{Red, Circle[{0, 0}, 8]}],
Graphics[Arrow[{{Cos[θ*3.6 °],
Sin[θ*3.6 °]}, {-Sin[θ*3.6 °],
Cos[θ*3.6 °]}}*{Sin[θ*3.6 °],
2 Cos[θ*3.6 °]}]],
PlotRange -> {{-10, 10}, {-10, 10}}], {θ, 0, 100, .11,
Appearance -> "Open"}]


I want the origin of that vector to sit on the edge of the circle and in the two periods, make one full period around the circle such that it is pointing up at the top and bottom poles and down and the two equators. I was thinking of using offset, but it keeps giving me an error. What I have so far is this:

Manipulate[
Show[Graphics[{Red, Circle[{0, 0}, 8]}],
Graphics[Arrow[{{Cos[t*3.6 °],
Sin[t*3.6 °]}, {-Sin[t*3.6 °],
Cos[t*3.6 °]}}*{Sin[t*3.6 °],
2 Cos[t*3.6 °]},
Offset[{-8 Sin[t*3.6 °], 8 Cos[t*3.6 °]}, {0,
0}]], PlotRange -> {{-10, 10}, {-10, 10}}]], {t, 0, 100, .11,
Appearance -> "Open"}]


I guess if it makes it more clear, I want the origin of the vector to line up with the dot at all times t in the following plot:

Manipulate[
Show[Graphics[{Red, Circle[{0, 0}, 8]}],
Graphics[Arrow[{{Cos[t*3.6 °],
Sin[t*3.6 °]}, {-Sin[t*3.6 °],
Cos[t*3.6 °]}}*{Sin[t*3.6 °],
2 Cos[t*3.6 °]}], PlotRange -> {{-10, 10}, {-10, 10}}],
Graphics[Point[{-8 Sin[t*3.6 °],
8 Cos[t*3.6 °]}]]], {t, 0, 100, .1,
Appearance -> "Open"}]


Does that make it more clear? I really really appreciate all of your help.

• It is not clear enough what you are asking, you need to edit and clarify what you need, include example of desired output and some background. Somebody already spend time answering and was not what you needed as a consequence to the question been ambiguous. – rhermans Nov 13 '15 at 8:30
• does this give what you need: Manipulate[ Graphics[{Red, Circle[{0, 0}, 8], Black, Arrow[8 {{- Sin[t*3.6 \[Degree]], Cos[t*3.6 \[Degree]]}, {Sin[t*3.6 \[Degree]], - Cos[t*3.6 \[Degree]]}}]}, PlotRange -> {{-10, 10}, {-10, 10}}], {t, 0, 100, .1, Appearance -> "Open"}]? – kglr Jul 14 '19 at 7:54

I embellished a bit to show the circle as well, but that should be easy to remove if you like. Also, note that since your vector points go as products of Sin and Cos, a full circle is achieved in only 180 degrees.

Manipulate[
Show[
Graphics[{Red, Circle[{0, 0.5}, .5]}],
Graphics[
Arrow[
{{Cos[t 1.8 °],
Sin[t 1.8 °]}, {-Sin[t 1.8 °],
Cos[t 1.8 °]}}*{Sin[t 1.8 °],
2 Cos[t  1.8 °]}
]], PlotRange -> {{-1.1, 1.1}, {-0.1, 2.1}}, AspectRatio -> 1]
, {{t, 0, Style["t", 25]}, 0, 100, .25, Appearance -> "Open"}] • Right, the multiplication is for rotating the vector to what a magnetic field line would look like if I went in a circle to the stationary perspective. That's what the Sin(~) + 2 Cos(~) is for. The point of my question was to plot that vector and have it go around a circle with radius R. As in the beginning point of that vector would be on a circle and as t -> 100 minutes, the vector would completely go around the circle while pointing in the proper orientation. Sorry if I was not clear. I really appreciate your help though! – Ethan Tsai Nov 13 '15 at 8:16
• Thanks for that, that helps a bit, but still not exactly what I'm looking for. The reason I want it to go 2 cycles is because this is a magnetic field circling earth, so it should have two periods within one full orbit. I've modified what you've given me to show more exactly what I want. – Ethan Tsai Nov 13 '15 at 19:32
• I really appreciate all of your help, but the thing I've been having the most trouble with is, I guess, offsetting the origin of the vector to an arbritary point. Any ideas on that? Sorry I've been so unclear. – Ethan Tsai Nov 13 '15 at 19:57