You can use ContourPlot
to draw the function and Show
to combine it with the other graphics:
With[{p =
ContourPlot[((x + 1)^2 + y^2)*((x - 1)^2 + y^2) == (1.2)^2,
{x, -3, 3}, {y, -3, 3}, Frame -> False]},
Manipulate[
Show[p, Graphics[{Circle[{-1, 0}, H], Circle[{1, 0}, 1.2/H]},
Axes -> True]], {H, Sqrt[1.2 + 1] - 1, Sqrt[1.2 + 1] + 1}]]
To show the Cassini Oval being drawn as you move the slider, I would suggest using a ParametricPlot
. First use Solve
to obtain a parametric description of the curve:
sol = {x, y} /. Solve[{
((x + 1)^2 + y^2) == h^2,
((x - 1)^2 + y^2) == (1.2/h)^2},
{x, y}];
Then put a parametric plot of sol
into the Manipulate
.
Manipulate[
ParametricPlot[sol, {h, Sqrt[1.2 + 1] - 1, H},
Epilog -> {Circle[{-1, 0}, H], Circle[{1, 0}, 1.2/H],
PointSize[Large], Point[sol /. h -> H]},
PlotRange -> 4, PlotStyle -> Thick],
{H, $MachineEpsilon + Sqrt[1.2 + 1] - 1, Sqrt[1.2 + 1] + 1}]