Eggs, melons, and peanuts - Cassini Oval

Also called: Cassinoid or Cassinian Ellipse
Written by Paul Bourke
April 2001


Around 1680 Giovanni Cassini investigated a family of curves which he believed defined the path the Earth takes around the sun. The curves were defined by all the points where the product of the distances from the point to two fixed points (call the separation 2a) were some constant (call this b2). Note an ellipse is defined as the points where the sum of the distances to two fixed points equal some constant.

The general appearance of the curve is dictated by the relative values of a and b. If a < b the curve forms a single loop, this loop becomes increasingly pinched as a approaches b. When a > b the curve is made up of two loops, at a = b it is the same as the lemnescate of Bernoulli that was documented about 14 years later.


There are a number of ways to describe the Cassini oval, some of these are given below.

Bipolar coordinates
r1 r2 = b2

Cartesian description from the definition

[(x - a)2 + y2] [(x + a)2 + y2] = b2

or equivalently
(a2 + x2 + y2)2 - 4 a2 x2 - b4 = 0

These clearly revert to a circle of radius b for a = 0.

Polar coordinates

r4 + a4 - b4 - 2 a2 r2 cos(2theta) = 0

It is possible to solve for r2 using the standard solution for a quadratic. When using this formulation to create the curve in 2D or surfaces of revolution to form solids in 3D be very careful about the range of theta and what the positive and negative solutions mean.

The parametric formulation used to create the curves and solids here is based up the following.

x(t) = cos(t) sqrt(C)
y(t) = sin(t) sqrt(C)
where C = a2 cos(2t) +/- sqrt(b4 - a2 sin2(2t))


  • Note b cannot be 0

  • When a < b the parameter t ranges from 0 to 2pi

  • When a = b the curve reduces to r2 = a2 cos(2theta)

  • When a > b each loop is defined in two parts, one using the positive version of C above, and the other using the negative version. The parameter t ranges from -0.5 arcsin(b2/a2) to 0.5 arcsin(b2/a2). A similar arrangement occurs for the polar formulation described earlier.

An unexpected way to create a Cassini curve is to slice a torus with a plane parallel to the axis of the torus. As the plane is moved outwards from the centre of the torus there is a transition of Cassini curves from a > b (two loops) to a = b, and finally a < b (single loop).


Sphere, a = 0.1, b = 1
The curve is a circle at a = 0.

Melon, a = 0.5, b = 1

Peanut, a = 0.9, b = 1

a = 0.99, b = 1
At a = b the curve is the same as the lemnescate of Bernoulli.

Egg, a = 1.01, b = 1
For a > b the curve splits into two half's mirrored by the y axis.
Only one half of 3D image is shown.

a = 1.1, b = 1
Only one half shown
The separation between the two foci is 2a.

Sphere, a = 2, b = 1
Only one half shown

Source code

The C source code that created the images on this page can be found here: cassini.c. While it creates output geometry in a particular format, the primitives are just lines and 3D polygons so it shouldn't be difficult to modify the code to create geometry in a format for your favourite package. The 3D solids are formed as surfaces of revolution about the x axis.


For PovRay users here are some examples of Cassini solids and code to create smooth triangle models: povcassini.c. The renderings here used the init file: cassini.ini and the PovRay scene file: cassini.pov. The output of povcassini.c is piped to "".

a = 1.99, b = 1

a = 1.02, b = 1