Changeset 118 for trunk/SRC/Interpolation/cutpar.pro
- Timestamp:
- 06/27/06 17:47:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/cutpar.pro
- Property svn:keywords set to Id
r114 r118 8 8 ; res = cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 9 9 ; 10 ; @param x0,y0 {in}{required} 1d arrays of p elements, giving the edge positions. The 10 ; @param x0 {in}{required} 11 ; @param y0 {in}{required} 12 ; @param x1 {in}{required} 13 ; @param y1 {in}{required} 14 ; @param x2 {in}{required} 15 ; @param y2 {in}{required} 16 ; @param x3 {in}{required} 17 ; @param y3 {in}{required} 18 ; 1d arrays of p elements, giving the edge positions. The 11 19 ; edges must be given as in plot to traw the parallelogram. (see 12 20 ; example). 13 ; @param n {in}{required} each parallelogram will be cutted in n^2 pieces14 21 ; 15 ; @ keyword /endpoints see outputs22 ; @param n {in}{required} each parallelogram will be cutted in n^2 pieces 16 23 ; 17 ; @keyword /onsphere to specify that the points are located on a 24 ; @keyword /endpoints see outputs 25 ; 26 ; @keyword /onsphere to specify that the points are located on a 18 27 ; sphere. In this case, x and y corresponds to longitude and 19 28 ; latitude in degrees. 20 29 ; 21 30 ; @returns 22 ; - defaut: 3d array(2,n^2,p) giving the center position of each31 ; - defaut: 3d array(2,n^2,p) giving the center position of each 23 32 ; piece of the parallelograms 24 ; - /endpoints: 3d array(2,(n+1)^2,p) giving the edge positions33 ; - /endpoints: 3d array(2,(n+1)^2,p) giving the edge positions 25 34 ; of each piece of the parallelograms 26 35 ; … … 29 38 ; @examples 30 39 ; 31 ; x0 = [2,6,2]32 ; y0 = [0,2,6]33 ; x1 = [3,8,4]34 ; y1 = [4,4,6]35 ; x2 = [1,6,4]36 ; y2 = [5,6,8]37 ; x3 = [0,4,2]38 ; y3 = [1,4,8]39 ; n = 440 ; splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata41 ; for i=0,2 do oplot, [x0[i],x1[i],x2[i],x3[i],x0[i]],[y0[i],y1[i],y2[i],y3[i],y0[i]]42 ; res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n)43 ; for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 340 ; IDL> x0 = [2,6,2] 41 ; IDL> y0 = [0,2,6] 42 ; IDL> x1 = [3,8,4] 43 ; IDL> y1 = [4,4,6] 44 ; IDL> x2 = [1,6,4] 45 ; IDL> y2 = [5,6,8] 46 ; IDL> x3 = [0,4,2] 47 ; IDL> y3 = [1,4,8] 48 ; IDL> n = 4 49 ; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 50 ; IDL> for i=0,2 do oplot, [x0[i],x1[i],x2[i],x3[i],x0[i]],[y0[i],y1[i],y2[i],y3[i],y0[i]] 51 ; IDL> res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 52 ; IDL> for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 3 44 53 ; 45 54 ; @history 46 55 ; S. Masson (smasson\@lodyc.jussieu.fr) 47 56 ; July 5th, 2002 57 ; 58 ; @version $Id$ 59 ; 48 60 ;- 49 61 FUNCTION cutpar, x0, y0, x1, y1, x2, y2, x3, y3, n, endpoints = endpoints, onsphere = onsphere
Note: See TracChangeset
for help on using the changeset viewer.