Next: Interpolation on Scattered Data, Previous: Voronoi Diagrams, Up: Geometry
The convex hull of a set of points, is the minimum convex envelope
containing all of the points. Octave has the functions convhull
and convhulln
to calculate the convec hull of 2-dimensional and
N-dimensional sets of points.
Returns the index vector to the points of the enclosing convex hull. The data points are defined by the x and y vectors.
A third optional argument, which must be a string, contains extra options passed to the underlying qhull command. See the documentation for the Qhull library for details.
See also: delaunay, convhulln.
Returns an index vector to the points of the enclosing convex hull. The input matrix of size [n, dim] contains n points of dimension dim.
If a second optional argument is given, it must be a string or cell array of strings containing options for the underlying qhull command. (See the Qhull documentation for the available options.) The default options are "s Qci Tcv".
See also: convhull, delaunayn.
An example of the use of convhull
is
x = -3:0.05:3; y = abs (sin (x)); k = convhull (x, y); plot (x(k), y(k), "r-", x, y, "b+"); axis ([-3.05, 3.05, -0.05, 1.05]);