source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/TRIANGULATION/definetri.html @ 321

Last change on this file since 321 was 321, checked in by smasson, 17 years ago

update documentation

File size: 6.3 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>definetri.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="definetri.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../../overview.html" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../../ToBeReviewed/TRIANGULATION//definetri.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="completecointerre.html">&lt;&lt;prev file</a> | <a href="definetri_e.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="definetri.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/TRIANGULATION/</a></h1>
82      <h2 class="pro_file">definetri.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 Define a triangulation array like <a href="/Applications/rsi/idl_6.3/help/online_help/TRIANGULATE.html">TRIANGULATE</a>.
91         But in a VERY SIMPLE CASE:
92 the points are regularly-gridded on nx*ny array.
93 Find a Delaunay triangulation for this set of points is easy:
94 Points define (nx-1)*(ny-1) rectangles which we can cut in 2 triangles.
95 cf. figure above
96
97<pre>
98 fixe
99      ny-1*---*---*. . . . . .*---*---*
100          |  +|  +|           |  +|  +|
101          | + | + |           | + | + |
102          |+  |+  |           |+  |+  |
103      ny-2*---*---*. . . . . .*---*---*
104          .       .           .       .
105          .       .           .       .
106          .       .           .       .
107         1*---*---*. . . . . .*---*---*
108          |  +|  +|           |  +|  +|
109          | + | + |           | + | + |
110          |+  |+  |           |+  |+  |
111         0*---*---*. . . . . .*---*---*
112           0   1   2        nx-3  nx-2 nx-1
113</pre>
114
115  You have 2 ways to cut a rectangle:
116      1) the upward diagonal       2) the downward diagonal
117
118<pre>
119          *---*                        *---*
120          |  +|                        |+  |
121          | + |                        | + |
122          |+  |                        |  +|
123          *---*                        *---*
124</pre>
125</div>
126
127     
128
129     
130
131     
132
133     
134
135      <div id="routine_details">
136       
137
138        <div class="routine_details" id="_definetri">
139
140          <h2><a class="top" href="#container">top</a>definetri <span class="categories">
141 Utilities
142</span></h2>
143       
144          <p class="header">
145            <span class="result">result = </span>definetri(<span class="result"><a href="#_definetri_param_nx">nx</a>, <a href="#_definetri_param_ny">ny</a>[, <a href="#_definetri_param_downward">downward</a>]</span>)</p>
146       
147          <div class="comments">
148</div>
149
150          <h3>Return value</h3><div class="preformat">
151 triangles is a 2d array and its dimensions are 3 and 2*(nx-1)*(ny-1).
152 triangles is defined like in the TRIANGULATE procedure.
153</div>
154
155         
156            <h3>Parameters</h3>
157       
158           
159            <h4 id="_definetri_param_nx">nx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160              <span class="attr">in</span>
161             
162             
163              <span class="attr">required</span>
164             
165             
166             
167             
168            </h4>
169       
170          <div class="comments">
171 The x dimension array
172</div>
173           
174            <h4 id="_definetri_param_ny">ny&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
175              <span class="attr">in</span>
176             
177             
178              <span class="attr">required</span>
179             
180             
181             
182             
183            </h4>
184       
185          <div class="comments">
186 The y dimension array
187</div>
188           
189            <h4 id="_definetri_param_downward">downward&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
190              <span class="attr">in</span>
191             
192              <span class="attr">optional</span>
193             
194             
195             
196             
197             
198            </h4>
199       
200          <div class="comments">
201 When DOWNWARD is undefined all rectangles are cut in using the upward
202 diagonal.
203 DOWNWARD is a vector which contains the rectangles numbers which are cut in
204 using the downward diagonal.
205 The rectangle number is defined by the index (in a nx*ny vector) of the
206 lower-left corner of the rectangle.
207</div>
208           
209
210         
211
212         
213
214          <h3>Examples</h3><div class="preformat">
215
216 IDL> triangles=definetri(3,3,[1,3])
217 triangles will be this kind of triangulation:
218
219          *---*---*
220          |+  |  +|
221          | + | + |
222          |  +|+  |
223          *---*---*
224          |  +|+  |
225          | + | + |
226          |+  |  +|
227          *---*---*
228
229</div>
230          <h3>Version history</h3>
231         
232          <h4>Version</h4><div class="preformat">
233 $Id: definetri.pro 297 2007-09-25 15:09:12Z pinsard $</div>
234          <h4>History</h4><div class="preformat">
235 sebastien Masson (smlod@ipsl.jussieu.fr)
236                       4/3/1999
237</div>
238         
239         
240         
241         
242         
243         
244         
245       
246         
247         
248         
249         
250         
251         
252         
253       
254          <h3>Statistics</h3>
255          <table class="statistics">
256            <tr><td>McCabe cyclic</td><td>           6</td></tr>
257            <tr><td>McCabe essential</td><td>           1</td></tr>
258            <tr><td>McCabe modular design</td><td>           1</td></tr>
259          </table>
260         
261       
262        </div>
263       
264      </div>
265
266     
267
268      <div id="tagline">Produced by IDLdoc 2.0.</div>
269
270    </div>
271
272  </body>
273</html>
Note: See TracBrowser for help on using the repository browser.