Cassinian Oval

Note

This Mathematica notebook is from the WWW project A Visual Dictionary of Special Plane Curves. Copyright © 1995-2002 by Xah Lee. (http://xahlee.org/)

Clear[a, b]; {a, b} = {1, 1};
ContourPlot[((((x - a))^2) + (y^2)) ((((x + a))^2) + 
                (y^2)) - (b^4), {x, -2, 2}, {y, -1.2, 1.2}, 
        Contours -> Table[(i^2) - 1, {i, -1, 2.5, (1/4)/2}], 
        PlotPoints -> 100, AspectRatio -> Automatic, 
        PlotRange -> All, ContourLines -> True, 
        ContourShading -> False, 
        ContourStyle -> ({Hue[#1, 1,  .5], Thickness[ .004]} &) /@ 
            Range[0, 1, (1/12)], 
        Ticks -> {Range[-1, 1], 
            Range[-2, 2], {- .5,  .5}}];
Clear[a, b];

Clear[a, b]; {a, b} = {1, 1};
ContourPlot[((((x - a))^2) + (y^2)) ((((x + a))^2) + 
                (y^2)) - (b^4), {x, -2, 2}, {y, -1.2, 1.2}, 
        Contours -> 
          Table[(i^2) - 1, {i, -1, 2.5, (2.5 - (-1))/28}], 
        PlotPoints -> 100, AspectRatio -> Automatic, 
        PlotRange -> All, ContourLines -> True, 
        ContourShading -> False, 
        ContourStyle -> 
          Table[{If[OddQ@i, Hue[1, 1, 1], Hue[0, 0, 0]], 
              Thickness[ .004]}, {i, 1, 29}], 
        Ticks -> {Range[-1, 1], 
            Range[-2, 2], {- .5,  .5}}];
Clear[a, b];