Could you help me in solving this issue. I would like making the point to follow the round sinusoidal curve, instead to turn on a circle. Here is what I wrote:
r = 5 + Sin[20 t];
curves = ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 Pi}];
Animate[Show[curves, Graphics[{PointSize[Large], Point[{5 Cos[t], 5 Sin[t]}]}]], {t, 0, 2 Pi}]
Could you correct in order to make the point run along the round sinusoidal. Thank you.
Georges, try:
r[t_] := 5 + Sin[20 t];
curves = ParametricPlot[r[t] {Cos[t], Sin[t]}, {t, 0, 2 Pi}];
Animate[Show[curves, Graphics[{PointSize[Large], Point[r[t] {Cos[t], Sin[t]}]}]], {t, 0, 2 Pi}]
It didn’t work. I got this notification:
SetDelayed::write: Tag Plus in (5+Sin[20 t])[t_] is Protected.
Could you or anyone still help me in making the point run along the round sinusoidal. Thank you.
Ok, you obviously did not start with a fresh kernel. Evaluate:
Clear[r]
before the rest of the code.
Most likely because of existing conflicting symbol definitions. Try ClearAll[r] or quit the kernel.
Henrik and Rohit, Thanks a lot.