Clear["Global`*"]
S1 = Inverse[{{0.5, 0}, {0, 0.2}}];
R1 = RotationMatrix[Pi/3];
p1 = {1, 1};
S2 = Inverse[{{1, 0}, {0, 0.5}}];
R2 = RotationMatrix[Pi/6];
p2 = {2, 2};
H1 = R1 . Transpose[S1] . S1 . Transpose[R1];
J1 = -(H1 . p1 + Transpose[H1] . p1);
C1 = p1 . H1 . p1 - 1;
H2 = R2 . Transpose[S2] . S2 . Transpose[R2];
J2 = -(H2 . p2 + Transpose[H2] . p2);
C2 = p2 . H2 . p2 - 1;
Show[Table[Graphics[{Red, Point[p]}], {p, {p1, p2}}],
Table[ContourPlot[{x, y} . H . {x, y} + Transpose[J] . {x, y} + C ==
0, {x, -5, 5}, {y, -5, 5}], {H, {H1, H2}}, {J, {J1, J2}}, {C, {C1,
C2}}], Axes -> True, AxesOrigin -> {0,0}]
which gives me the eight ellipses because of Descarte product on three variables each which takes two values.
What I want is by using Table to generate an output where value of H , J and C start at the same time such as to get {{first value of H,first value of J,first value of C},{second value of H,second value of J,second value of C},{third value of H,third value of J,third value of C}}. In the example above, the output would be two ellipse.
There is one similar question which provides two methods.
One is adding Diagonal
, but here is three variables not two variables. Diagonal
would gives three results.
The other is using MapThread
instead of Table
, but ContourPlot
is not a math function.
Thank you for any and all suggestions