Navigation

Operators and Keywords

Function List:

C++ API

: ellipsoid (xc, yc, zc, xr, yr, zr, n)
: ellipsoid (…, n)
: ellipsoid (hax, …)
: [x, y, z] = ellipsoid (…)

Plot a 3-D ellipsoid.

The inputs xc, yc, zc specify the center of the ellipsoid. The inputs xr, yr, zr specify the semi-major axis lengths.

The optional input n determines the number of faces around the circumference of the cylinder. The default value is 20.

If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by gca.

If outputs are requested ellipsoid returns three matrices in meshgrid format, such that surf (x, y, z) generates the ellipsoid.

See also: cylinder, rectangle, sphere.

Demonstration 1

The following code

 clf;
 ellipsoid (0, 0, 1, 2, 3, 4, 20);
 title ("ellipsoid()");

Produces the following figure

Figure 1

Package: octave