Mercurial > octave-antonio
comparison scripts/geometry/delaunay.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 7ff0bdc3dc4c |
comparison
equal
deleted
inserted
replaced
11586:12df7854fa7c | 11587:c792872f8942 |
---|---|
23 ## described by the indices to the data point x and y vector. | 23 ## described by the indices to the data point x and y vector. |
24 ## The triangulation satisfies the Delaunay circum-circle criterion. | 24 ## The triangulation satisfies the Delaunay circum-circle criterion. |
25 ## No other data point is in the circum-circle of the defining triangle. | 25 ## No other data point is in the circum-circle of the defining triangle. |
26 ## | 26 ## |
27 ## A third optional argument, which must be a string, contains extra options | 27 ## A third optional argument, which must be a string, contains extra options |
28 ## passed to the underlying qhull command. See the documentation for the | 28 ## passed to the underlying qhull command. See the documentation for the |
29 ## Qhull library for details. | 29 ## Qhull library for details. |
30 ## | 30 ## |
31 ## @example | 31 ## @example |
32 ## @group | 32 ## @group |
33 ## x = rand (1, 10); | 33 ## x = rand (1, 10); |
47 function ret = delaunay (x, y, opt) | 47 function ret = delaunay (x, y, opt) |
48 | 48 |
49 if (nargin != 2 && nargin != 3) | 49 if (nargin != 2 && nargin != 3) |
50 print_usage (); | 50 print_usage (); |
51 endif | 51 endif |
52 | 52 |
53 if ((isvector (x) && isvector (y) && length (x) == length (y)) | 53 if ((isvector (x) && isvector (y) && length (x) == length (y)) |
54 || size_equal (x, y)) | 54 || size_equal (x, y)) |
55 if (nargin == 2) | 55 if (nargin == 2) |
56 tri = delaunayn ([x(:), y(:)]); | 56 tri = delaunayn ([x(:), y(:)]); |
57 elseif (ischar (opt) || iscellstr (opt)) | 57 elseif (ischar (opt) || iscellstr (opt)) |