(1) You can use Locator
as a graphics primitive and rotate all the graphics primitives, and
(2) use Experimental`AngularSlider
to control the angle:
Manipulate[Graphics[Rotate[{Line[{{0, 0}, p}], Locator[Dynamic[p]]}, θ, {0, 0}],
PlotRange -> 2, ImageSize -> Small],
{{p, {1, 0}}, None},
{{θ, 0, ""}, 0, 2 π, Labeled[Experimental`AngularSlider[#, {0, 2 Pi},
Experimental`BoundaryAction -> None], Row[{"θ = ", #}], Top] &},
Deployed -> True]
To prevent the locator from going out of plot area after rotation, we can use the second argument of Dynamic
to restrict the locator to stay within a disk of radius 2:
Manipulate[Graphics[Rotate[{Line[{{0, 0}, p}],
AbsolutePointSize[10], Red, Point[p],
Locator[Dynamic[p, (p = If[Norm[#] < 2, #, 2 Normalize[#]];) &], None]},
θ, {0, 0}], PlotRange -> 2, ImageSize -> Small],
{{p, {1, 0}}, None},
{{θ, 0, ""}, 0, 2 π, Labeled[Experimental`AngularSlider[#, {0, 2 Pi},
Experimental`BoundaryAction -> None], Row[{"θ = ", #}], Top] &},
Deployed -> True]
Update: If you want the two controls linked so that the angle is updated as the locator moves, change Locator[...]
to
Locator[Dynamic[p, (p = If[Norm[#] < 2, #, 2 Normalize[#]]; θ = ArcTan @@ p) &], None]