User Manual 3.4.1 Ellipsoids

De Wiki
Aller à : navigation, rechercher

Definition

An ellipsoid is a closed quadric surface that is the three dimensional analogue of an ellipse. Assuming the XYZ coordinate system is such that the ellipsoid is centered and axis-aligned, the ellipsoids equation is given by:

[math]\mathcal{S} = \left\{ (x, y, z) \in \mathbb{R}^3 \middle/ {x^2 \over a^2} + {y^2 \over b^2} + {z^2 \over c^2} = 1\right\}[/math]
Ellipsoid.PNG

a,b and c are called the semi axes of the ellipsoid.

Implementation

The Ellipsoid object in the SIRIUS library implements the [MAT_GEO_EllipsoidInterface Ellipsoid interface]. Please refer to the Javadoc for a complete list of public methods.

Instantiation

In order to instantiate an ellipsoid, the user must specify the ellipsoids' center, it's axis of revolution, X-axis, and all three semi-axis [math]a, b[/math] and [math]c[/math]. For example :

// Spheroid parameters
Vector3D position = new Vector3D(0, 0, 0);
Vector3D revAxis = new Vector3D(0, 0, 1);
Vector3D xAxis = new Vector3D(1, 0, 0);
double a = 2.0;
double c = 1.5;
double c = 1.0;
// The ellipsoid itself
Ellipsoid myEllipsoid = new Ellipsoid(position, revAxis, xAxis, a, b, c);

Usage

Please refer to the [MAT_GEO_Home#HInteractions Interactions with other geometrical objects section] for methods inherited from the Shape interface.