FUNCTION REFERENCE
sphere
Create a sampled unit sphere or draw it as a surface.
Create a sampled unit sphere or draw it as a surface.
Syntax
[X, Y, Z] = sphereSyntax
[X, Y, Z] = sphere(n)Syntax
sphere(n)Returns three (n+1)-by-(n+1) coordinate arrays, with n = 20 by default. Rows run from the south pole to the north pole. A call without outputs draws the surface. Coordinate generation accepts integer n from 1 to 999. Drawing also uses the figure's 100000-face limit.
Example
[X, Y, Z] = sphere(4); size(Z) % [5 5]Example
sphereThese are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.