Manipulate with arguments points on a circle
Manipulate[Column[{Row[{Graphics[{Red, PointSize[Large], Circle[],
Locator[Dynamic[pt1, (pt1 = Normalize[#]) &]], Text[Round[pt1, .01], {0, 1.5}]}],
Graphics[{Blue, PointSize[Large], Circle[],
Locator[Dynamic[pt2, (pt2 = Normalize[#]) &]], Text[Round[pt2, 0.01], {0, 1.5}]}]},
Spacer[20]],
Show[ParametricPlot3D[{Cos[t] (R + Cos[u]), Sin[t] (R + Cos[u]), Sin[u]},
{t, 0, 2 Pi}, {u, 0, 2 Pi},
Mesh -> None, PlotStyle -> Opacity[.4],
PlotLabel -> Style[Row[{"f[{pt1, pt2}] =", f[{pt1, pt2}]}], 16],
ImageSize -> 400],
Graphics3D[{Red, PointSize[Large], Point[f[{pt1, pt2}]]}]]},
Dividers -> Center, Alignment -> Center],
{{pt1, {Cos[0], Sin[0]}}, None}, {{pt2, {Cos[Pi], Sin[Pi]}}, None}]
As an alternative to kglr's take, here is how one can use Experimental`AngularSlider[]
inside Manipulate[]
:
With[{R = 2, r = 1},
Manipulate[Show[torus,
Graphics3D[{Red, PointSize[Large],
Point[{(R + r Cos[ϕ]) Cos[θ],
(R + r Cos[ϕ]) Sin[θ], r Sin[ϕ]}]}]],
Row[{Control[{{θ, 0}, Experimental`AngularSlider[Dynamic[θ]] &}],
Spacer[20],
Control[{{ϕ, 0}, Experimental`AngularSlider[Dynamic[ϕ]] &}]}],
Initialization :> (torus =
ParametricPlot3D[{(R + Cos[u]) Cos[t], (R + Cos[u]) Sin[t], Sin[u]},
{t, 0, 2 π}, {u, 0, 2 π}, Mesh -> None,
PlotStyle -> Opacity[.4], ImageSize -> 400];),
SaveDefinitions -> True]]