[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

#### 15.1.2.2 Three-dimensional Geometric Shapes

__Function File:__**cylinder**__Function File:__**cylinder***(*`r`)__Function File:__**cylinder***(*`r`,`n`)__Function File:__[`x`,`y`,`z`] =**cylinder***(…)*__Function File:__**cylinder***(*`ax`, …)Generates three matrices in

`meshgrid`

format, such that`surf (`

generates a unit cylinder. The matrices are of size`x`,`y`,`z`)

-by-`n`+1

.`n`+1`r`is a vector containing the radius along the z-axis. If`n`or`r`are omitted then default values of 20 or [1 1] are assumed.Called with no return arguments,

`cylinder`

calls directly`surf (`

. If an axes handle`x`,`y`,`z`)`ax`is passed as the first argument, the surface is plotted to this set of axes.Examples:

disp ("plotting a cone") [x, y, z] = cylinder (10:-1:0,50); surf (x, y, z);

**See also:**sphere.

__Function File:__[`x`,`y`,`z`] =**sphere***(*`n`)__Function File:__**sphere***(*`h`, …)Generates three matrices in

`meshgrid`

format, such that`surf (`

generates a unit sphere. The matrices of`x`,`y`,`z`)

-by-`n`+1

. If`n`+1`n`is omitted then a default value of 20 is assumed.Called with no return arguments,

`sphere`

call directly`surf (`

. If an axes handle is passed as the first argument, the surface is plotted to this set of axes.`x`,`y`,`z`)**See also:**peaks.

__Function File:__[`x`,`y`,`z`] =**ellipsoid***(*`xc`,`yc`,`zc`,`xr`,`yr`,`zr`,`n`)__Function File:__**ellipsoid***(*`h`, …)Generate three matrices in

`meshgrid`

format that define an ellipsoid. Called with no return arguments,`ellipsoid`

calls directly`surf (`

. If an axes handle is passed as the first argument, the surface is plotted to this set of axes.`x`,`y`,`z`)**See also:**sphere.

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |