why does the following code not work?
r = {2.30 Cos[5s], -2.30 Sin[5s]};
Manipulate[ParametricPlot[{Sin[3 t], Cos[2 t]}, {t, 0, 2 Pi},
PlotRange -> {{-r[[1]] , r[[1]]}, {-r[[2]] , r[[2]]}}], {s, 0.1, 2 Pi, 0.01}]
but if I put r[[1]] and r[[2]] by hand it works
Manipulate[ParametricPlot[{Sin[3 t], Cos[2 t]}, {t, 0, 2 Pi},
PlotRange -> {{-2.3 Cos[5 s],2.3 Cos[5 s]}, {2.3 Sin[5 s] , -2.3 Sin[5 s]}}]
,{s, 0.1, 2 Pi,0.01}]
Manipulatedoes not "see" that $r$ depends on $s$, the manipulated variable. The quickest fix would be to move the definition ofrto inside theManipulate, rather than outside it:Manipulate[r = ..; ParametricPlot[..], {s, 0.1, 2 Pi, 0.01}]. – MarcoB Dec 18 '19 at 18:33PlotRange -> ({-#, #} & /@ r). – MarcoB Dec 18 '19 at 18:41