(octave.info)Three-dimensional Geometric Shapes
15.2.2.3 Three-dimensional Geometric Shapes
...........................................
-- : cylinder
-- : cylinder (R)
-- : cylinder (R, N)
-- : cylinder (HAX, ...)
-- : [X, Y, Z] = cylinder (...)
Plot a 3-D unit cylinder.
The optional input R is a vector specifying the radius along the
unit z-axis. The default is [1 1] indicating radius 1 at ‘Z == 0’
and at ‘Z == 1’.
The optional input N determines the number of faces around the
circumference of the cylinder. The default value is 20.
If the first argument HAX is an axes handle, then plot into this
axes, rather than the current axes returned by ‘gca’.
If outputs are requested ‘cylinder’ returns three matrices in
‘meshgrid’ format, such that ‘surf (X, Y, Z)’ generates a unit
cylinder.
Example:
[x, y, z] = cylinder (10:-1:0, 50);
surf (x, y, z);
title ("a cone");
See also: Note: ellipsoid, *note rectangle:
XREFrectangle, Note: sphere.
-- : sphere ()
-- : sphere (N)
-- : sphere (HAX, ...)
-- : [X, Y, Z] = sphere (...)
Plot a 3-D unit sphere.
The optional input N determines the number of faces around the
circumference of the sphere. The default value is 20.
If the first argument HAX is an axes handle, then plot into this
axes, rather than the current axes returned by ‘gca’.
If outputs are requested ‘sphere’ returns three matrices in
‘meshgrid’ format such that ‘surf (X, Y, Z)’ generates a unit
sphere.
Example:
[x, y, z] = sphere (40);
surf (3*x, 3*y, 3*z);
axis equal;
title ("sphere of radius 3");
See also: Note: cylinder, *note ellipsoid:
XREFellipsoid, Note: rectangle.
-- : ellipsoid (XC, YC, ZC, XR, YR, ZR, N)
-- : ellipsoid (..., N)
-- : ellipsoid (HAX, ...)
-- : [X, Y, Z] = ellipsoid (...)
Plot a 3-D ellipsoid.
The inputs XC, YC, ZC specify the center of the ellipsoid. The
inputs XR, YR, ZR specify the semi-major axis lengths.
The optional input N determines the number of faces around the
circumference of the cylinder. The default value is 20.
If the first argument HAX is an axes handle, then plot into this
axes, rather than the current axes returned by ‘gca’.
If outputs are requested ‘ellipsoid’ returns three matrices in
‘meshgrid’ format, such that ‘surf (X, Y, Z)’ generates the
ellipsoid.
See also: Note: cylinder, *note rectangle:
XREFrectangle, Note: sphere.
automatically generated by info2www version 1.2.2.9