# How to add a line perpendicular to the x-axis to the points in the formation process of a sine curve and some others?

BX[t_] :=
Module[{g1, g2, g3, g4, r},
g1 = ParametricPlot[{{Cos[2 \[Pi] r],
Sin[2 \[Pi] r]}, {\[Pi] t r/64, Sin[\[Pi] t r/64]}}, {r, 0, 1},
PlotStyle -> {RGBColor[1, 1/2, 0]},
Ticks -> {{-1, 0, 1, \[Pi]/2, \[Pi], 3 \[Pi]/2, 2 \[Pi],
5 \[Pi]/2, 3 \[Pi], 7 \[Pi]/2, 4 \[Pi]}, {-1, 0, 1}},
PlotRange -> {{-2, 5 \[Pi]}, {-2, 2}}, Axes -> True,
AxesStyle -> Arrowheads[{0.0, 0.02}], AxesLabel -> {x, y}];
g2 = ParametricPlot[{{r Cos[\[Pi] t/64],
r Sin[\[Pi] t/64]}, {r (\[Pi] t/64) + (1 - r) Cos[\[Pi] t/64],
Sin[\[Pi] t/64]}}, {r, 0, 1}, PlotStyle -> {RGBColor[0, 1, 0]}];
g3 = Graphics[{PointSize[0.01], RGBColor[1, 0, 0],
Point[{\[Pi] t/64, Sin[\[Pi] t/64]}]}];
g4 = Graphics[{PointSize[0.01], RGBColor[1, 0, 0],
Point[{Cos[\[Pi] t/64], Sin[\[Pi] t/64]}]}];
Show[g1, g2, g3, g4, AspectRatio -> Automatic, ImageSize -> 700]];
Animate[BX[t], {t, 0, 268, 1}]

Using the above code, the following dynamic graph can be generated:

1.How to optimize the code to obtain a moving line perpendicular to the x-axis for both the moving point in the unit circle and the moving point in the coordinate system. The effect is shown in the following figure:

2.As shown in the above figure, how to make the circular arc scanned by the moving point on the unit circle starting from the positive half axis of the starting edge x-axis change color, and at the same time, the corresponding equal circular arc values on the x-axis also change color accordingly.

3.As shown in the above figure: How to add an arrow symbol to represent this dynamic angle in the unit circle.

If you use ListPlot[] for the points, you can use Filling to draw the lines to the Axis.

Module[{g1, g2, g3, g4, r},
g1 = ParametricPlot[{{Cos[2 \[Pi] r],
Sin[2 \[Pi] r]}, {\[Pi] t r/64, Sin[\[Pi] t r/64]}}, {r, 0, 1},
PlotStyle -> {RGBColor[1, 1/2, 0]},
Ticks -> {{-1, 0, 1, \[Pi]/2, \[Pi], 3 \[Pi]/2, 2 \[Pi],
5 \[Pi]/2, 3 \[Pi], 7 \[Pi]/2, 4 \[Pi]}, {-1, 0, 1}},
PlotRange -> {{-2, 5 \[Pi]}, {-2, 2}}, Axes -> True,
AxesStyle -> Arrowheads[{0.0, 0.02}], AxesLabel -> {x, y}];
g2 = ParametricPlot[{{r Cos[\[Pi] t/64],
r Sin[\[Pi] t/64]}, {r (\[Pi] t/64) + (1 - r) Cos[\[Pi] t/64],
Sin[\[Pi] t/64]}}, {r, 0, 1}, PlotStyle -> {RGBColor[0, 1, 0]}];
g3 = ListPlot[{{\[Pi] t/64, Sin[\[Pi] t/64]}},
PlotStyle -> Directive[PointSize[0.01], RGBColor[1, 0, 0]],
Filling -> Axis, FillingStyle -> Directive[Green, Dashed]];
g4 = ListPlot[{{Cos[\[Pi] t/64], Sin[\[Pi] t/64]}},
PlotStyle -> Directive[PointSize[0.01], RGBColor[1, 0, 0]],
Filling -> Axis, FillingStyle -> Directive[Green, Dashed]];
Show[g1, g2, g3, g4, AspectRatio -> Automatic, ImageSize -> 700]];
Animate[BX[t], {t, 0, 268, 1}]

Note: g3 and g4 could be combined into a single plot using {{\[Pi] t/64, Sin[\[Pi] t/64]},{Cos[\[Pi] t/64], Sin[\[Pi] t/64]}} for the points.

You can just construct elements as follows:

f[t_] :=
Module[{p = {{Cos[t], Sin[t]}, {t, Sin[t]}}},
Show[Plot[Sin[x], {x, 0, 6 Pi}],
Graphics[{Circle[], Red, PointSize[0.02], Point[p],
Green, Line[p], Dashed, Line[{{Cos[t], 0}, p[[1]]}],
Line[{{t, 0}, p[[2]]}]}], AspectRatio -> Automatic,
PlotRange -> {{-2, 6 Pi}, {-2, 2}}]]

Then animate either with ListAnimate or export as gif, e.g.

To show angle (mod 2$$\pi$$):

f2[t_] :=
Module[{p = {{Cos[t], Sin[t]}, {t, Sin[t]}}},
Show[Plot[Sin[x], {x, 0, 6 Pi}],
Graphics[{Circle[], {Opacity[0.5], Pink,
Disk[{0, 0}, 1, {0, Mod[t, 2 Pi]}]}, Red, PointSize[0.02],
Point[p], Green, Line[p], Dashed, Line[{{Cos[t], 0}, p[[1]]}],
Line[{{t, 0}, p[[2]]}]}], AspectRatio -> Automatic,
PlotRange -> {{-2, 6 Pi}, {-2, 2}}]]