# Manipulate[ ParametricPlot[ does not produce graphs for defined functions

Posted 10 years ago
965 Views
|
|
0 Total Likes
|
 I have a weird problem to which I cannot figure out the answer. When defining two functions and then using them inside ParametricPlot in a Manipulate, no graph is produced. Pasting the functions directly into ParametricPlot creates the Plot. I tried to use Evaluate, but no success. What am I not getting? Attached is a notebook that shows what works and what does not. Thanks for any explanation as to what isgoing on.  x[t_] := R Cos[t] + r Cos[k t] y[t_] := R Sin[t] + r Sin[k t]  Manipulate[  ParametricPlot[{x[t], y[t]}, {t, 0, 2 \[Pi]}, Axes -> True,    PlotRange -> {{-4, 4}, {-4, 4}},    PlotStyle -> {Thick, Red}], {{R, 1}, 1, 2}, {{r, .5}, -1,    2}, {{k, 7}, 1, 11}] (* this one did not work*)Manipulate[ ParametricPlot[{R Cos[t] + r Cos[k t], R Sin[t] + r Sin[k t]}, {t, 0,    2 \[Pi]}, Axes -> False, PlotRange -> {{-4, 4}, {-4, 4}},   PlotStyle -> {Thick, Red}], {{R, 1}, 1, 2}, {{r, .5}, -1,   2}, {{k, 7}, 1, 11}](* This one work s perfectly *)xx[t_] = R Cos[t] + r Cos[k t];yy[t_] = R Sin[t] + r Sin[k t];Manipulate[ ParametricPlot[{xx[t], yy[t]}, {t, 0, 2 \[Pi]}, Axes -> True,   PlotRange -> {{-4, 4}, {-4, 4}},   PlotStyle -> {Thick, Red}], {{R, 1}, 1, 2}, {{r, .5}, -1,   2}, {{k, 7}, 1, 11}](*Tried with = instead of := function assignment, but that did not change anything *)