Ellipsoids & balls#

Ellipsoid#

To define an ellipsoidal volume, do the same way as for an ellipse or a disk (See Ellipse or Disk), namely using 4 points \(c\), \(v_1\), \(v_2\), \(v_6\), defined as in the following figure:

Figure made with TikZ

Figure made with TikZ

There is a parameter for each of them: _center, _v1, _v2, and _v6 taking points or a single value (in this case, it is like a 1D point).

For ellipsoidal volumes where main axes are parallel to x-axis, y-axis and z-axis, the ellipsoid can be defined with the center and 3 axis lengths. For this purpose, use _xlength, _ylength and _zlength, taking one single positive value. Semi-axis lengths can be also defined by using _xradius, _yradius and _zradius parameters.

_nnodes can take one single value, an explicit list of 3 or 12 values or a Numbers object, one for each quarter of ellipse. _hsteps can take one real value, an explicit list of 6 real values or a Reals object. If required, give names of main domain and side domains as explained in Geometry definition.

As for Parallelepiped, Cuboid and Cube objects, the number of octants to deal with (parameter _nboctants) may be selected. Let us explain this with the following figure:

Figure made with TikZ

Figure made with TikZ

Considering the center of the ellipsoid, and the associated trihedron, symbolized by black dashed arrows, the ellipsoid can be split into 8 parts, corresponding to one octant. Octants having a numbering convention, when giving the number of octants, for instance 5, to build intersection of the ellipsoid with octants 1 to 5. The default value is 8, so that the whole ellipsoid is considered. This is a way to define some specific geometries, such as:

  • the Fichera ellipsoid (7 octants):

Figure made with TikZ

Figure made with TikZ

  • the ellipsoidal L-shape (6 octants):

Figure made with TikZ

Figure made with TikZ

  • the ellipsoid with 5 octants:

Figure made with TikZ

Figure made with TikZ

  • the half ellipsoid (4 octants):

Figure made with TikZ

Figure made with TikZ

  • the half ellipsoidal L-shape (3 octants):

Figure made with TikZ

Figure made with TikZ

  • the quarter of ellipsoid (2 octants):

Figure made with TikZ

Figure made with TikZ

  • the eighth of ellipsoid(1 octants):

Figure made with TikZ

Figure made with TikZ

Examples:

Point o(0.,0.,0.), a(3.,0.,0.), b(0.,2.,0.), c(0.,0.,1.);
Ellipsoid e1(_center=o, _v1=a, _v2=b, _v6=c, _nnodes={35, 30, 25},
             _domain_name="Omega1", _side_names="Gamma");
Ellipsoid e2(_center=o, _v1=a, _v2=b, _v6=c,
             _nnodes={35, 35, 35, 35, 30, 30, 30, 30, 25, 25, 25, 25},
             _domain_name="Omega1", _side_names="Gamma");
Ellipsoid e3(_center=o,_xlength=6, _ylength=4, _zlength=2,
             _nnodes={35, 30, 25}, _domain_name="Omega1", _side_names="Gamma");

These are 3 definitions of the same Ellipsoid object. The difference between \(e_1\) and \(e_2\) explains the ability to give 3 or 12 values for _nnodes.

Let’s summarize information about geometrical keys on ellipsoids:

key(s)

authorized types

examples

_center, _v1, _v2, _v6

Point

_center=Point(0.,0.,0.)

_xlength, _ylength, _zlength, _xradius, _yradius, _zradius

single unsigned integer or real positive value

_xlength=1, _zradius=2.5

_nboctants

single unsigned integer value between 1 and 8

_nboctants=3

Ball#

To define a ball, do the same way as for an ellipsoid (See Ellipsoid, namely using 4 points \(c\), \(p_1\), \(p_2\), \(p_6\), defined as in the following figure:

Figure made with TikZ

Figure made with TikZ

There is a parameter for each of them: _center, _v1, _v2, and _v6 taking points or a single value (in this case, it is like a 1D point). For balls where main axes are parallel to x-axis, y-axis and z-axis, the ball can be defined with the center and the radius. For this purpose, use _radius, taking one single positive value.

_nnodes can take one single value, an explicit list of 3 or 12 values or a Numbers object, one for each quarter of ellipse. _hsteps can take one real value, an explicit list of 6 real values or a Reals object.

Give an additional argument: the number of octants to deal with (parameter _nboctants). See Ellipsoid for details.

If required give names of main domain and side domains as explained in Geometry definition.

Point o(0.,0.,0.), a(3.,0.,0.), b(0.,3.,0.), c(0.,0.,3.);
Ball b1(_center=o, _v1=a, _v2=b, _v6=c, _nnodes={35, 30, 25},
        _domain_name="Omega1", _side_names="Gamma");
Ball b2(_center=o, _v1=a, _v2=b, _v6=c, _domain_name="Omega1", _side_names="Gamma",
        _nnodes={35, 35, 35, 35, 30, 30, 30, 30, 25, 25, 25, 25});
Ball b3(_center=o, _radius=3, _nnodes={35, 30, 25}, _domain_name="Omega1",
        _side_names="Gamma");

These are 3 definitions of the same Ball object. The difference between b1 and b2 explains the ability to give 3 values for _nnodes.

Important

The Ball object has another name Sphere

Let’s summarize information about geometrical keys on balls:

key(s)

authorized types

examples

_center, _v1, _v2, _v6

Point

_center=Point(0.,0.,0.)

_radius

single unsigned integer or real positive value

_radius=1, _radius=2.5

_nboctants

single unsigned integer value between 0 and 8

_nboctants=3