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