source: trunk/TRIANGULATION/drawcoast_e.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

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