Cassinian Oval

Note

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

Packages and Initializations

Needs["ParaPlot`"]
Needs["PlaneCurveFormulas`"]
Needs["PlaneCurveGenerator`"]

Needs["Graphics`ImplicitPlot`"]
(*MathSource Item:0200-529*)

$HistoryLength = 5;

definition of Cassinian oval

CassinianOval is defined as follows:
Given fixed points F1 and F2. Given a constant B.
The locus of points such that
distance[P,F1] * distance[P,F2] == B, 
is cassinian oval.

The fixed points F1 and F2 are called foci.
Let the foci be {a,0} and {-a,0}.
Let the constant B be b^2.

The distance from a point {x,y} to another {m,n} is Sqrt[(x-m)^2+(y-n)^2].
Thus the equation for cassinian oval is
Sqrt[(x-a)^2+y^2]*Sqrt[(x+a)^2+y^2]==b^2

(Sqrt[(((x - a))^2) + (y^2)]) (Sqrt[(((x + a))^2) + (y^2)]) == 
      (b^2)

Since the expression nside square roots are always positev, we square both sides to get
((-a + x)^2 + y^2)*((a + x)^2 + y^2) == b^4

illustration by Implicit plot

(* a Cassinian Oval with a > b by ImplicitPlot *)
Clear[a,b]; {a,b} = {1.04,1};
ImplicitPlot[
	((x-a)^2 + y^2) ((x+a)^2 + y^2) == b^4,
	{x,-1.7,1.7}, {y,-.7,.7},
	PlotStyle->{Hue[.65]},
	Epilog->{
		Hue[.65], PointSize[.02], Point[{-a,0}],
		Hue[.65], PointSize[.02], Point[{a,0}]
	}
];Clear[a,b];

Cassinian curve family by ContourPlot

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)}], 
        PlotPoints -> 50, AspectRatio -> Automatic, 
        PlotRange -> All, ContourLines -> True, 
        ContourShading -> False, 
        ContourStyle -> ({Hue[#1, 1,  .5], Thickness[ .006]} &) /@ 
            Range[0, 1, (1/12)], 
        Ticks -> {Range[-1, 1], 
            Range[-2, 2], {- .5,  .5}}];
Clear[a, b];

illustration by parametric plot

Here we want to generate a illustration of several Cassinian Ovals in one graphics so that we can get a feel of how the family of curve looks.

The contour plot doesn't look so nice for the case a==b.
The Parametric formula only works for a<b.

So we plot Cassinian Ovals with a < b, and foci {-1,0}, {1,0} using ParametricPlot. And we plot Cassinian Ovals of a > b using ContourPlot. and combine them in one graphics.

?CassinianOval

CassinianOval[a,b][t]

Clear[a,b, gp];
{a,b} = {1,1};

gp = 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}],
	PlotPoints->50,
	AspectRatio->Automatic,
	PlotRange->All,
	ContourLines->True, ContourShading->False,
	ContourStyle->({Hue[#,1,.5],Thickness[.006]}&/@Range[0,1,1/12]),
	Ticks->{Range[-1,1], Range[-2,2],{-.5,.5}},
	DisplayFunction->Identity
];

gp = Part[ Graphics@ gp, 1, -Range[1,6]];

ParametricPlot[ 
	Evaluate@{
	CassinianOval[1, 2      ][t],
	CassinianOval[1, 1.5    ][t],
	CassinianOval[1, 1.3    ][t],
	CassinianOval[1, 1.1    ][t],
	CassinianOval[1, 1.0001][t]
	},
	{t, 0, 2 Pi},
	PlotStyle->
		Table[{Hue[i,1,.9],Thickness[.007]},
		{i,0,1,1/5}],
	AspectRatio->Automatic,
	PlotPoints->30, Ticks->{{1, 2,3},{1, 2,3}},
	PlotRange->{{-1,1}2.3,{-1,1}2},
	Epilog->{
		Hue[.65], PointSize[.02], Point[{-1,0}],
		Hue[.65], PointSize[.02], Point[{1,0}],
		gp
	}
];