1
$\begingroup$

A follow up to the previous question. The function circp[x,y,t] below is used to plot a curve (circle or ellipse) at different position in a single plot as shown

circp[x_, y_, t_] := Module[{eox, eoy, con, ex, ey, out, phase},
  eox = 2*x;
  eoy = 2*y;
  con = Sqrt[eox^2 + eoy^2];
  phase = Arg[eox] - Arg[eoy];
  ex = (eox*Cos[t])/con;
  ey = (-eoy*Sin[t + phase])/con;
  out = {x, y} + {ex, ey}]

plot = ParametricPlot[{circp[1, 1, t], circp[1, 3, t], circp[1, 5, t],
    circp[3, 1, t], circp[3, 3, t], circp[3, 5, t]}, {t, 0, 2*Pi}, 
  Frame -> True]

But now if i try to make a table it does not work. I get blank plot. I tried like this:

data = Table[circp[x, y, t], {x, 1, 3, 2}, {y, 1, 3, 2}];
 newplot = ParametricPlot[Flatten[data, 1], {t, 0, 2*Pi}]

Also i need the spacing between each curve to be same.

$\endgroup$

1 Answer 1

1
$\begingroup$

It works, but you need to use same number of circles and also use Evaluate to get the coloring. Also added Frame->True

 data = Table[circp[x, y, t], {x, 1, 3, 2}, {y, 1, 5, 2}]
newplot = ParametricPlot[Evaluate@Flatten[data, 1], {t, 0, 2*Pi}, 
  Frame -> True]

enter image description here

I get blank plot. I tried like this:

This is strange. I do not get blank plot. But the plot I get is not the the same your first Plot. I am using V 14

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.