
Q2. To prevent disks from appearing as ellipses you can
- Specify the radius as
Offset[r]
in absolute units. That is,
{Red, Disk[{t, Cos[t]}, Offset[4]]}
and
{Red, Disk[{t, Sin[t]}, Offset[4]]}
- Use
Point
instead of Disk
: e.g.,
{Red, AbsolutePointSize[7], Point[{t, Sin[t]}]}
Q3: Use the same ImageSize
in all three plots (adding invisible axes labels where missing to prevent different automatic resizing caused by different sized labels)
Q1: It may be possible to do it without abandoning GraphicsGrid
... but an alternative approach using a single plot with all the desired elements is possible:
Without the axes we can get the three plots in a single ParametricPlot
:
Manipulate[ParametricPlot[{{Cos[x], Sin[x]}, {2 + x, Sin[x]}, {Cos[x], -2 - x}},
{x, 0, t},
MeshFunctions -> {#3 &},
Mesh -> {{t}},
MeshStyle -> Directive[Red, PointSize[Large]],
PlotStyle -> Thick,
PlotRange -> {{-3/2, 2 + 2 Pi}, {-2 - 2 Pi, 3/2}},
Axes -> False,
ImageSize -> 300,
PlotRangePadding -> Scaled[.03],
ImagePadding -> 20,
PlotRangeClipping -> False,
Prolog -> {Thick, Dashed, Green, Line[{{0, 0}, {Cos[t], Sin[t]}}],
EdgeForm[Dashed], FaceForm[Opacity[.2, Yellow]],
Polygon[{{Cos[t], Sin[t]}, {2 + t, Sin[t]}, {Cos[t], -2 - t}}]}],
{{t, Pi/3}, 0.01, 2 Pi}]

To add the three axes we need to construct graphics primitives that look like axes:
ClearAll[axisFunc]
axisFunc[tl1_: 5, tl2_: 5, to_: - 25][a_, b_, start_, end_, z_,
dir : (Horizontal | Vertical)] :=
Module[{f = dir /. {Horizontal -> Identity, Vertical -> Reverse},
p = dir /. {Horizontal -> 1, Vertical -> 2}},
{Text[Style[#[[p]] If[a < b, 1, -1], 10], Offset[f@{0, to/p},
MapAt[Rescale[#, {a, b}, {a + start, b + end}] &, #, {p}]], {0, 0}] & /@
(If[tl1 > 0 && tl2 > 0, Rest@#, #] &@ Thread[f@{Subdivide[a, b, 3], z}]),
Thin, Line[{f@{#, z}, f@{#2, z}}] & @@ {a + start, b + end},
Line[{Offset[f@{0, -tl1}, #], Offset[f@{0, tl2}, #]}] & /@
Thread[f@{Subdivide[a + start, b + end, 3], z}],
Line[{Offset[f@{0, -tl1/2}, #], Offset[f@{0, tl2/2}, #]}] & /@
Thread[f@{Complement[Subdivide[a + start, b + end, 9],
Subdivide[a + start, b + end, 3]], z}]}];
We use axisFunc
with different parameters to construct the axes to be added to the Prolog
option setting:
axes = {axisFunc[5, 5, -10][0, 2 Pi, 2, 2, 0, Horizontal],
axisFunc[10, 0, 10][-1, 1, 0, 0, -2, Horizontal],
axisFunc[][0, -2 Pi, -2, -2, 0, Vertical],
axisFunc[0, 10, -15][-1, 1, 0, 0, 2, Vertical]};
axeslabels = {Text[Style[TraditionalForm[Sin[θ]], 15, Black], {1.4, 0}, {0, 0}, {0, 1}],
Text[Style[TraditionalForm[Cos[θ]], 15, Black], {0, -1.4}, {0, 0}],
Text[Style[TraditionalForm[θ], 15, Black], {2.3 + 2 Pi, 0}, {0, 0}],
Text[Style[TraditionalForm[θ], 15, Black], {0, -2.3 - 2 Pi}, {0, 0}]};
Manipulate[ParametricPlot[{{Cos[x], Sin[x]}, {2 + x, Sin[x]}, {Cos[x], -2 - x}},
{x, 0, t},
MeshFunctions -> {#3 &},
Mesh -> {{t}},
MeshStyle -> Directive[Red, PointSize[Large]],
PlotStyle -> Thick,
PlotRange -> {{-3/2, 2 + 2 Pi}, {-2 - 2 Pi, 3/2}},
Axes -> False,
ImageSize -> 400,
PlotRangePadding -> Scaled[.03],
ImagePadding -> 20,
PlotRangeClipping -> False,
Prolog -> {axes, axeslabels, Dashed, Thick, Red,
Line[{{0, -2 - t}, {Cos[t], -2 - t}}], Line[{{2 + t, Sin[t]}, {2 + t, 0}}],
Green, Line[{{0, 0}, {Cos[t], Sin[t]}}], EdgeForm[Dashed],
FaceForm[Opacity[.2, Yellow]],
Polygon[{{Cos[t], Sin[t]}, {2 + t, Sin[t]}, {Cos[t], -2 - t}}]}],
{{t, Pi/3}, 0.01, 2 Pi}]

Replace Manipulate[stuff, {{t, Pi/3}, 0.01, 2 Pi}]
with
frames = Table[stuff, {t, 0.01, 2 Pi, 2 Pi/100}];
and Export
frames as GIF
file to get the animation at the top.
{Red, Disk[{t, Sin[t]}, 0.09]}
with{Red, AbsolutePointSize[7], Point[{t, Sin[t]}]}
; similarly for the other disk. $\endgroup$