Skip to content

ellipsoid

plot · scripts/plot/draw/ellipsoid.m

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

Generate the surface of an axis-aligned ellipsoid.

The centre is (xc, yc, zc) and the semi-axes are xr, yr, zr. The coordinates are returned as (n+1)-by-(n+1) matrices (default n = 20) laid out like those of sphere. Without output arguments the ellipsoid is drawn.