source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/inquad.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 9.5 KB
RevLine 
[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>inquad.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="inquad.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="../../../Interpolation//inquad.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&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
[189]74<a href="imoms3.html">&lt;&lt;prev file</a> | <a href="inrecgrid.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="inquad.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>
[89]75
76</div>
77
78
79    <div id="container">
80
[189]81      <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1>
[89]82      <h2 class="pro_file">inquad.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
[138]89      <div id="file_comments">
90 to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4)
[101]91</div>
[89]92
93     
94
95     
96
97     
98
99     
100
101      <div id="routine_details">
102       
103
104        <div class="routine_details" id="_inquad">
105
[234]106          <h2><a class="top" href="#container">top</a>inquad <span class="categories">
[157]107 Grid
[101]108</span></h2>
[89]109       
110          <p class="header">
[321]111            <span class="result">result = </span>inquad(<span class="result"><a href="#_inquad_param_x">x</a>, <a href="#_inquad_param_y">y</a>, <a href="#_inquad_param_x1">x1</a>, <a href="#_inquad_param_y1">y1</a>, <a href="#_inquad_param_x2">x2</a>, <a href="#_inquad_param_y2">y2</a>, <a href="#_inquad_param_x3">x3</a>, <a href="#_inquad_param_y3">y3</a>, <a href="#_inquad_param_x4">x4</a>, <a href="#_inquad_param_y4">y4</a></span>, <a href="#_inquad_keyword_ONSPHERE">ONSPHERE</a>=<span class="result">ONSPHERE</span>, <a href="#_inquad_keyword_DOUBLE">DOUBLE</a>=<span class="result">DOUBLE</span>, <a href="#_inquad_keyword_DELTA">DELTA</a>=<span class="result">DELTA</span>, <a href="#_inquad_keyword_NOPRINT">NOPRINT</a>=<span class="result">NOPRINT</span>, <a href="#_inquad_keyword_NEWCOORD">NEWCOORD</a>=<span class="result">NEWCOORD</span>)</p>
[89]112       
[234]113          <div class="comments">
114</div>
[89]115
[138]116          <h3>Return value</h3><div class="preformat">
[242]117 a n elements vector where n is the number of elements of
[138]118 x. res[i]=j means that the point number i is located in the
119 quadrilateral number j with (0 <= j <= n_elements(x0)-1)
[101]120</div>
[89]121
122         
123            <h3>Parameters</h3>
124       
125           
126            <h4 id="_inquad_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]127              <span class="attr">in</span>
[89]128             
129             
[101]130              <span class="attr">required</span>
[89]131             
132             
133             
134             
135            </h4>
136       
[118]137          <div class="comments"></div>
[89]138           
139            <h4 id="_inquad_param_y">y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]140              <span class="attr">in</span>
[89]141             
142             
[118]143              <span class="attr">required</span>
[89]144             
145             
146             
147             
148            </h4>
149       
[118]150          <div class="comments">
[138]151 the coordinates of the point we want to know where it is.
152 Must be a scalar if /ONSPHERE activated else can be scalar or array.
[118]153</div>
[89]154           
155            <h4 id="_inquad_param_x1">x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]156              <span class="attr">in</span>
[89]157             
158             
[101]159              <span class="attr">required</span>
[89]160             
161             
162             
163             
164            </h4>
165       
[118]166          <div class="comments"></div>
[89]167           
168            <h4 id="_inquad_param_y1">y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]169              <span class="attr">in</span>
[89]170             
171             
[118]172              <span class="attr">required</span>
[89]173             
174             
175             
176             
177            </h4>
178       
179          <div class="comments"></div>
180           
181            <h4 id="_inquad_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]182              <span class="attr">in</span>
[89]183             
184             
[118]185              <span class="attr">required</span>
[89]186             
187             
188             
189             
190            </h4>
191       
192          <div class="comments"></div>
193           
194            <h4 id="_inquad_param_y2">y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]195              <span class="attr">in</span>
[89]196             
197             
[118]198              <span class="attr">required</span>
[89]199             
200             
201             
202             
203            </h4>
204       
205          <div class="comments"></div>
206           
207            <h4 id="_inquad_param_x3">x3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]208              <span class="attr">in</span>
[89]209             
210             
[118]211              <span class="attr">required</span>
[89]212             
213             
214             
215             
216            </h4>
217       
218          <div class="comments"></div>
219           
220            <h4 id="_inquad_param_y3">y3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]221              <span class="attr">in</span>
[89]222             
223             
[118]224              <span class="attr">required</span>
[89]225             
226             
227             
228             
229            </h4>
230       
231          <div class="comments"></div>
232           
233            <h4 id="_inquad_param_x4">x4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]234              <span class="attr">in</span>
[89]235             
236             
[118]237              <span class="attr">required</span>
[89]238             
239             
240             
241             
242            </h4>
243       
244          <div class="comments"></div>
245           
246            <h4 id="_inquad_param_y4">y4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]247              <span class="attr">in</span>
[89]248             
249             
[118]250              <span class="attr">required</span>
[89]251             
252             
253             
254             
255            </h4>
256       
[118]257          <div class="comments">
[138]258 the coordinates of the quadrilateral given in the CLOCKWISE order.
259 Scalar or array.
[118]260</div>
[89]261           
262
263         
264
265         
266
267            <h3>Keywords</h3>
268           
269            <h4 id="_inquad_keyword_ONSPHERE">ONSPHERE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
270             
271             
272             
273             
274             
275             
276             
277             
278            </h4>
279       
[138]280            <div class="comments">
[163]281 to specify that the quadrilateral are on a sphere and
282 that their coordinates are longitude-latitude coordinates. In this
[321]283 case, east-west periodicity, poles singularity and other pbs
[138]284 related to longitude-latitude coordinates are managed
285 automatically.
[101]286</div>
[89]287           
288            <h4 id="_inquad_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
289             
290             
291             
292             
293             
294             
295             
296             
297            </h4>
298       
[138]299            <div class="comments">
300 use double precision to perform the computation
[101]301</div>
[89]302           
[321]303            <h4 id="_inquad_keyword_DELTA">DELTA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[89]304             
305             
306             
307             
308             
309             
[121]310              <span class="attr">default:</span> <span class="value">4</span>
[89]311             
312            </h4>
313       
[121]314            <div class="comments">
[321]315 to speed up the program, we reduce the aera where we look for potential
316 quadrilaterals containing (x,y). Delta defines the limit of the box
317 centred on (x,y) with a zonal and meridional extent of delta degrees.
[138]318</div>
[89]319           
320            <h4 id="_inquad_keyword_NOPRINT">NOPRINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
321             
322             
323             
324             
325             
326             
327             
328             
329            </h4>
330       
[138]331            <div class="comments">
332 to suppress the print messages.
[101]333</div>
[89]334           
335            <h4 id="_inquad_keyword_NEWCOORD">NEWCOORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
336             
337             
338             
339             
340             
341             
342             
343             
344            </h4>
345       
[118]346            <div class="comments">
347</div>
[89]348           
349         
350
[138]351          <h3>Examples</h3><div class="preformat">
[101]352
[402]353   IDL> x = 1.*[1, 2, 6, 7, 3]
354   IDL> y = 1.*[1, 3, 3, 4, 7]
355   IDL> x1 = 1.*[0,4,2]
356   IDL> y1 = 1.*[1,4,8]
357   IDL> x2 = 1.*[1,6,4]
358   IDL> y2 = 1.*[5,6,8]
359   IDL> x3 = 1.*[3,8,4]
360   IDL> y3 = 1.*[4,4,6]
361   IDL> x4 = 1.*[2,6,2]
362   IDL> y4 = 1.*[0,2,6]
363   IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata
364   IDL> for i=0,2 do oplot, [x4[i],x1[i],x2[i],x3[i],x4[i]],[y4[i],y1[i],y2[i],y3[i],y4[i]]
365   IDL> oplot, x, y, color = 20, psym = 1, thick = 2
366   IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4)
[101]367
[234]368 On a sphere see
[290]369 <a href="..//Interpolation/clickincell.html">clickincell</a> ...
[101]370</div>
371          <h3>Version history</h3>
[89]372         
[234]373          <h4>Version</h4><div class="preformat">
[402]374 $Id: inquad.pro 371 2008-08-07 09:32:02Z pinsard $
[118]375</div>
[138]376          <h4>History</h4><div class="preformat">
[101]377      Sebastien Masson (smasson@lodyc.jussieu.fr)
378      August 2003
[138]379      Based on Convert_clic_ij.pro written by Gurvan Madec
[101]380</div>
[89]381         
382         
[101]383          <h3>Known issues</h3>
[89]384         
385         
386         
[138]387          <h4>Restrictions</h4><div class="preformat">
388 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
389 This has to be tested.
[101]390</div>
[89]391       
392         
393         
394         
395         
396         
397         
398         
399       
[163]400          <h3>Statistics</h3>
401          <table class="statistics">
[321]402            <tr><td>McCabe cyclic</td><td>          22</td></tr>
[163]403            <tr><td>McCabe essential</td><td>           1</td></tr>
404            <tr><td>McCabe modular design</td><td>           1</td></tr>
405          </table>
[89]406         
407       
408        </div>
409       
410      </div>
411
412     
413
414      <div id="tagline">Produced by IDLdoc 2.0.</div>
415
416    </div>
417
418  </body>
[249]419</html>
Note: See TracBrowser for help on using the repository browser.