ellipsoid
Create an ellipsoid.
📝Syntax
[X, Y, Z] = ellipsoid(xc, yc, zc, xr, yr, zr)
[X, Y, Z] = ellipsoid(xc, yc, zc, xr, yr, zr, n)
ellipsoid(...)
ellipsoid(ax, ...)
📥Input Arguments
Parameter Description
xc, yc, zc the center of the ellipsoid.
xr, yr, zr the semi-axis lengths along x, y and z.
n a positive integer: the grid resolution (default 20). The result is (n+1)-by-(n+1).
📤Output Arguments
Parameter Description
X, Y, Z the coordinates of the ellipsoid surface.
📄Description

ellipsoid generates the coordinates of an ellipsoid centered at (xc, yc, zc) with semi-axes (xr, yr, zr). Called without an output argument, it draws the surface.

💡Examples
f = figure();
ellipsoid(0, 0, 0, 3, 2, 1);
axis equal
🔗See Also
spheresurf
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub