# [✓] Use your own functions in a parametric plot?

GROUPS:
 Consider the following code: x[t_] := (a - b) Cos[t] + b Cos[(a/b - 1) t] y[t_] := (a - b) Sin[t] - b Sin[(a/b - 1) t for example ParametricPlot[{x[t], y[t] }, {t, 0, 12 [Pi]}, .....] I tried different ways without success.
10 months ago
5 Replies
 Frank Kampas 1 Vote what are the values of a and b? Also, you don't have a semicolon between the definitions of the two functions or a closing ] at the end and you have [ ] around Pi. a = 2; b = 3; x[t_] := (a - b) Cos[t] + b Cos[(a/b - 1) t]; y[t_] := (a - b) Sin[t] - b Sin[(a/b - 1) t]; ParametricPlot[{x[t], y[t]}, {t, 0, 2 Pi}] 
10 months ago
 Try this: x[t_, a_, b_] := (a - b) Cos[t] + b Cos[(a/b - 1) t] y[t_, a_, b_] := (a - b) Sin[t] - b Sin[(a/b - 1) t] Manipulate[ ParametricPlot[{x[t, a, b], y[t, a, b]}, {t, 0, 12 Pi}], {a, 1/2, 59/6, 1/3}, {b, 1, 10}] 
 One more variation on the same subject: z[t_, a_, b_] := {(a - b) Cos[t] + b Cos[(1 - a/b) t], (a - b) Sin[t] + b Sin[(1 - a/b) t]} ParametricPlot[ Evaluate[MapThread[ z[t, #1, #2] &, {Range[-(1/2), 9, 1/3], Range[-(1/3), 14, 1/2]}]], {t, 0, 180 \[Pi]}, PlotTheme -> "Marketing", Axes -> False, PlotStyle -> Thick]