manpagez: man pages & more
info octave
Home | html | info | man
 [ < ] [ > ] [ << ] [ 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 (x, y, z)` generates a unit cylinder. The matrices are of size `n+1`-by-`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 (x, y, z)`. If an axes handle 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); ```

Function File: [x, y, z] = sphere (n)
Function File: sphere (h, …)

Generates three matrices in `meshgrid` format, such that `surf (x, y, z)` generates a unit sphere. The matrices of `n+1`-by-`n+1`. If n is omitted then a default value of 20 is assumed.

Called with no return arguments, `sphere` call directly `surf (x, y, z)`. If an axes handle is passed as the first argument, the surface is plotted to this set of axes.

Generate three matrices in `meshgrid` format that define an ellipsoid. Called with no return arguments, `ellipsoid` calls directly `surf (x, y, z)`. If an axes handle is passed as the first argument, the surface is plotted to this set of axes.
```© manpagez.com 2000-2018