~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/eng/metanet/convex_hull.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>convex_hull</TITLE>
 
6
  <TYPE>Scilab function</TYPE>
 
7
  <DATE>September 1996</DATE>
 
8
  <SHORT_DESCRIPTION name="convex_hull"> convex hull of a set of points in the plane</SHORT_DESCRIPTION>
 
9
  <CALLING_SEQUENCE>
 
10
    <CALLING_SEQUENCE_ITEM>[nhull,ind] = convex_hull(xy)  </CALLING_SEQUENCE_ITEM>
 
11
  </CALLING_SEQUENCE>
 
12
  <PARAM>
 
13
    <PARAM_INDENT>
 
14
      <PARAM_ITEM>
 
15
        <PARAM_NAME>xy</PARAM_NAME>
 
16
        <PARAM_DESCRIPTION>
 
17
          <SP>: 2 x n real matrix</SP>
 
18
        </PARAM_DESCRIPTION>
 
19
      </PARAM_ITEM>
 
20
      <PARAM_ITEM>
 
21
        <PARAM_NAME>nhull</PARAM_NAME>
 
22
        <PARAM_DESCRIPTION>
 
23
          <SP>: integer</SP>
 
24
        </PARAM_DESCRIPTION>
 
25
      </PARAM_ITEM>
 
26
      <PARAM_ITEM>
 
27
        <PARAM_NAME>ind</PARAM_NAME>
 
28
        <PARAM_DESCRIPTION>
 
29
          <SP>: integer row vector</SP>
 
30
        </PARAM_DESCRIPTION>
 
31
      </PARAM_ITEM>
 
32
    </PARAM_INDENT>
 
33
  </PARAM>
 
34
  <DESCRIPTION>
 
35
    <P><VERB>convex_hull</VERB> finds the convex hull of a given set of n points in
 
36
    the plane. <VERB>xy</VERB> is the 2 x n matrix of the (x,y) coordinates of
 
37
    the given points. <VERB>convex_hull</VERB> returns in <VERB>nhull</VERB> the number
 
38
    of the points of the boundary of the convex hull and in <VERB>ind</VERB> the
 
39
    row vector (of size <VERB>nhull</VERB>) giving the indices in <VERB>xy</VERB> of the
 
40
    points of the boundary. The order in <VERB>ind</VERB> corresponds to
 
41
    consecutive points on the boundary.</P>
 
42
  </DESCRIPTION>
 
43
  <EXAMPLE>
 
44
<![CDATA[
 
45
ta=[27 27 3 12 11 12 27 26 26 25 25 24 23 23 21 22 21 20 19 18 18];
 
46
ta=[ta  16 15 15 14 12 9 10 6 9 17 8 17 10 20 11 23 23 12 18 28]; 
 
47
he=[ 1  2 2  4  5 11 13  1 25 22 24 22 22 19 13 13 14 16 16  9 16];
 
48
he=[he  10 10 11 12  2 6  5 5 7  8 7  9  6 11  4 18 13  3 28 17];
 
49
g=make_graph('foo',0,28,ta,he);
 
50
xx=[46 120 207 286 366 453 543 544 473 387 300 206 136 250 346 408];
 
51
g('node_x')=[xx 527 443 306 326 196 139 264  55  58  46 118 513];
 
52
yy=[36  34  37  40  38  40  35 102 102  98  93  96 167 172 101 179];
 
53
g('node_y')=[yy 198 252 183 148 172 256 259 258 167 109 104 253];
 
54
show_graph(g);
 
55
xy=[g('node_x');g('node_y')];
 
56
[nhull,ind] = convex_hull(xy)
 
57
show_nodes(ind);
 
58
 ]]>
 
59
  </EXAMPLE>
 
60
</MAN>