| MATLAB Function Reference | ![]() |
![]()
sphere
sphere(n)
[X,Y,Z] = sphere(n)
The sphere function generates the x-, y-, and z-coordinates of a unit sphere for use with surf and mesh.
sphere generates a sphere consisting of 20-by-20 faces.
sphere(n) draws a surf plot of an n-by-n sphere in the current figure.
[X,Y,Z] = sphere(n) returns the coordinates of a sphere in three matrices that are (n+1)-by-(n+1) in size. You draw the sphere with surf(X,Y,Z) or mesh(X,Y,Z).
Generate and plot a sphere.
sphere axis equal

Polygons and Surfaces for related functions
![]() | sph2cart | spinmap | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |