[29] | 1 | PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex |
---|
| 2 | ;--------------------------------------------------------- |
---|
[114] | 3 | ; |
---|
| 4 | compile_opt idl2, strictarrsubs |
---|
| 5 | ; |
---|
[29] | 6 | @cm_4mesh |
---|
| 7 | IF NOT keyword_set(key_forgetold) THEN BEGIN |
---|
| 8 | @updatenew |
---|
| 9 | @updatekwd |
---|
| 10 | ENDIF |
---|
| 11 | ;--------------------------------------------------------- |
---|
[2] | 12 | tempsun = systime(1) ; pour key_performance |
---|
| 13 | ;--------------------------------------------------------- |
---|
[29] | 14 | if keyword_set(key_periodic) AND nx EQ jpi then begin |
---|
[2] | 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 |
---|
[29] | 24 | if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) |
---|
[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 $ |
---|
[29] | 31 | AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) |
---|
[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]]] $ |
---|
[29] | 37 | , color = coast_color, thick = coast_thick, /normal, _extra = ex |
---|
[2] | 38 | endfor |
---|
| 39 | ENDIF |
---|
| 40 | ; |
---|
| 41 | ; we plot the borders of the diamond in this sense : / |
---|
| 42 | ; |
---|
[29] | 43 | if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) |
---|
[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 $ |
---|
[29] | 50 | AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) |
---|
[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]]] $ |
---|
[29] | 56 | , color = coast_color, thick = coast_thick, /normal, _extra = ex |
---|
[2] | 57 | endfor |
---|
| 58 | ENDIF |
---|
| 59 | |
---|
| 60 | ;--------------------------------------------------------- |
---|
| 61 | if keyword_set(key_performance) THEN print, 'temps drawcoast_e', systime(1)-tempsun |
---|
| 62 | return |
---|
| 63 | end |
---|