source: trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_e.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex
2;---------------------------------------------------------
3;
4  compile_opt idl2, strictarrsubs
5;
6@cm_4mesh
7  IF NOT keyword_set(key_forgetold) THEN BEGIN
8@updatenew
9@updatekwd
10  ENDIF
11;---------------------------------------------------------
12   tempsun = systime(1)         ; pour key_performance
13;---------------------------------------------------------
14   if keyword_set(key_periodic) AND nx EQ jpi then begin
15      mask = [mask, mask[0, *]]
16      xf = [xf, xf[0, *]]
17      yf = [yf, yf[0, *]]
18      nx = nx+1
19   ENDIF
20;
21; we plot the borders of the diamond in this sense : \
22;
23   if NOT keyword_set(onemore) then onemore = 0
24   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2)
25   distanceseuil = (!p.position[2]-!p.position[0])/xseuil
26; liste: liste des points i pourlesquels on va tracer un segment
27   index = lindgen(nx, ny)
28   index = index[0:nx-2, 1:ny-1]
29   indexbis = index-nx+((index/nx+onemore) MOD 2)
30   liste = where(mask[index+1]+mask[indexbis] EQ 1 $
31                 AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2)
32   IF liste[0] NE -1 THEN BEGIN
33      index = index[liste]
34      indexbis = indexbis[liste]
35      for pt = 0, n_elements(index)-1 do begin
36         plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $
37           , color = coast_color, thick = coast_thick, /normal, _extra = ex
38      endfor
39   ENDIF
40;
41; we plot the borders of the diamond in this sense : /
42;
43   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2)
44   distanceseuil = (!p.position[2]-!p.position[0])/xseuil
45; liste: liste des points i pourlesquels on va tracer un segment
46   index = lindgen(nx, ny-1)
47   index = index[0:nx-2, *]
48   indexbis = index+nx+((index/nx+onemore) MOD 2)
49   liste = where(mask[index+1]+mask[indexbis] EQ 1 $
50                 AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2)
51   IF liste[0] NE -1 THEN BEGIN
52      index = index[liste]
53      indexbis = indexbis[liste]
54      for pt = 0, n_elements(index)-1 do begin
55         plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $
56           , color = coast_color, thick = coast_thick, /normal, _extra = ex
57      endfor
58   ENDIF
59
60;---------------------------------------------------------
61   if keyword_set(key_performance) THEN print, 'temps drawcoast_e', systime(1)-tempsun
62   return
63end
Note: See TracBrowser for help on using the repository browser.