Ignore:
Timestamp:
03/16/07 10:22:26 (17 years ago)
Author:
pinsard
Message:

corrections of some misspellings in some *.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_c.pro

    r163 r226  
    77; Construct the triangulation array. 
    88; 
    9 ; The idea is: construct a list of triangle which link points between them.  
     9; The idea is: construct a list of triangle which link points between them. 
    1010; This is automatically done by the function TRIANGULATE 
    1111;  Here: 
    12 ; we consider the fact that points are disposed on a grid (regular or not,  
    13 ; but not unstructured, that is to say that points are written following a  
    14 ; rectangular matrix). A easy way to do triangles between all points is then:  
     12; we consider the fact that points are disposed on a grid (regular or not, 
     13; but not unstructured, that is to say that points are written following a 
     14; rectangular matrix). A easy way to do triangles between all points is then: 
    1515; 
    1616;     for each point (i,j) of the matrix -except those of the last line and of 
     
    2222; drawing to make sure!!), so there are two possible choice for each rectangle 
    2323; we want to cut in 2 triangles... 
    24 ;  
     24; 
    2525; It is thanks to this choice that we will be able to trace coast with right 
    2626; angles. At each angle of coast remarkable by the existence of an unique land 
    2727; point or of an unique ocean point on one of the four summit of a rectangle (i,j), 
    2828; we have to cut the rectangle following the diagonal passing by this point. 
    29 ;  
     29; 
    3030; @categories 
    3131; Graphics 
    3232; 
    3333; @param MASKENTREE {in}{optional}{type=2d array} 
    34 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR,  
     34; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 
    3535; ...TRIANGULATION=triangule(mask) 
    3636; If this argument is not specified, the function use tmask 
     
    4343; 
    4444; @keyword COINMONTE {type=array} 
    45 ; To obtain the array of "ascending land corner" to be treated with  
    46 ; completecointerre.pro in the variable array instead of make it pass by the global  
     45; To obtain the array of "ascending land corner" to be treated with 
     46; completecointerre.pro in the variable array instead of make it pass by the global 
    4747; variable twin_corners_up. 
    4848; 
     
    5252; @returns 
    5353; res: tableau 2d (3,nbre de triangles). 
    54 ; Each line of res represent indexes of points constituting summits of a triangle.  
     54; Each line of res represent indexes of points constituting summits of a triangle. 
    5555; See how we trace triangles in definetri.pro 
    5656; 
     
    6161; 
    6262; @restrictions 
    63 ; Datas whose we want to do the contour must be disposed in a matrix.  
    64 ; On the other hand, in the matrix, the points's arrangement can not be  
     63; Datas whose we want to do the contour must be disposed in a matrix. 
     64; On the other hand, in the matrix, the points's arrangement can not be 
    6565; irregular. If it is, use TRIANGULE. 
    6666; 
     
    7373; 
    7474; @todo 
    75 ; seb L.267->268 je ne pense pas que ce soit ce que tu voulais dire mais  
     75; seb L.267->268 je ne pense pas que ce soit ce que tu voulais dire mais 
    7676; c'est la traduction de ce qu'il y avait écrit. Correction si besoin. 
    7777;- 
     
    101101;------------------------------------------------------------ 
    102102if keyword_set(key_periodic)*(nx EQ jpi) $ 
    103   AND NOT keyword_set(basic) then BEGIN  
     103  AND NOT keyword_set(basic) then BEGIN 
    104104    msk = [msk, msk[0, *]] 
    105105    nx = nx+1 
    106106ENDIF 
    107107;------------------------------------------------------------ 
    108 ; We will find the list of rectangles (i,j)(located by their left  
    109 ; bottom corner) we have to cut folowing a descendant diagonal.  
     108; We will find the list of rectangles (i,j)(located by their left 
     109; bottom corner) we have to cut following a descendant diagonal. 
    110110; We will call this list : pts_downward 
    111 ;  
     111; 
    112112pts_downward = 0 
    113113 
     
    164164ENDIF 
    165165; 
    166 if n_elements(pts_downward) EQ 1 then BEGIN  
     166if n_elements(pts_downward) EQ 1 then BEGIN 
    167167    tempdeux = systime(1)       ; For key_performance =2 
    168168; 
     
    173173    coinmont = -1 
    174174    coindesc = -1 
    175 ENDIF ELSE BEGIN  
     175ENDIF ELSE BEGIN 
    176176    tempdeux = systime(1)       ; For key_performance =2 
    177177    pts_downward = pts_downward[1:n_elements(pts_downward)-1] 
    178178    pts_downward = pts_downward[uniq(pts_downward, sort(pts_downward))] 
    179 ; None rectangle can have an element of the last column or of the  
     179; None rectangle can have an element of the last column or of the 
    180180; last line as left bottom corner. 
    181181; so we have to remove these points if they has been selected in pts_downward. 
    182     derniere_colonne = (lindgen(ny)+1)*nx-1  
    183     derniere_ligne = lindgen(nx)+(ny-1)*nx  
     182    derniere_colonne = (lindgen(ny)+1)*nx-1 
     183    derniere_ligne = lindgen(nx)+(ny-1)*nx 
    184184    pts_downward =different(pts_downward,derniere_colonne ) 
    185185    pts_downward =different(pts_downward,derniere_ligne ) 
     
    193193            coindesc =different(coindesc,derniere_ligne ) 
    194194        endif 
    195     ENDIF ELSE BEGIN  
     195    ENDIF ELSE BEGIN 
    196196        coinmont = -1 
    197197        coindesc = -1 
    198     ENDELSE  
     198    ENDELSE 
    199199    IF testvar(var = key_performance) EQ 2 THEN $ 
    200200      print, 'temps triangule: menage ds pts_downward coinmont et coindesc', systime(1)-tempdeux 
     
    205205    IF testvar(var = key_performance) EQ 2 THEN $ 
    206206      print, 'temps triangule: definetri', systime(1)-tempdeux 
    207 ENDELSE  
     207ENDELSE 
    208208;------------------------------------------------------------ 
    209209; We delete land points which only contain land points. 
    210210;------------------------------------------------------------ 
    211211; 
    212 ;   
     212; 
    213213if (NOT keyword_set(basic)) AND (NOT keyword_set(keep_cont)) then begin 
    214214    tempdeux = systime(1)       ; For key_performance =2 
     
    224224    trimask = intarr(nx, ny) 
    225225    trimask[0:nx-2, 0:ny-2] = 1 
    226     IF recdsterre[0] NE -1 then BEGIN  
     226    IF recdsterre[0] NE -1 then BEGIN 
    227227        tempdeux = systime(1)   ; For key_performance =2 
    228228        indice[recdsterre] = 1 
     
    231231            vire2 = 0 
    232232            while (vire1[0] NE -1 OR vire2[0] NE -1) ne 0 do begin 
    233 ; Delete rectangles we have to remove from recsterre (in fact those we have  
    234 ; to keep although they ar eentirely in the land). 
     233; Delete rectangles we have to remove from recsterre (in fact those we have 
     234; to keep although they are entirely in the land). 
    235235                vire1 = where( (indice*shift(indice, -1, -1) $ 
    236236                                *(1-shift(indice, 0, -1))*(1-shift(indice, -1, 0))*trimask) EQ 1) 
    237                 if vire1[0] NE -1 THEN BEGIN  
     237                if vire1[0] NE -1 THEN BEGIN 
    238238                    indice[vire1] = 0 
    239239;               indice[vire1+nx+1] = 0 
    240240                endif 
    241                  
     241 
    242242                vire2 = where( ((1-indice)*(1-shift(indice, -1, -1)) $ 
    243243                                *shift(indice, 0, -1)*shift(indice, -1, 0)*trimask) EQ 1) 
    244                 if vire2[0] NE -1 THEN BEGIN  
     244                if vire2[0] NE -1 THEN BEGIN 
    245245                    indice[vire2+1] = 0 
    246246;               indice[vire2+nx] = 0 
     
    259259        trigarde = transpose(temporary(trigarde)) 
    260260        trigarde = [trigarde, trigarde+1] 
    261 ;  
     261; 
    262262        triang = triang[*, temporary(trigarde[*])] 
    263263        IF testvar(var = key_performance) EQ 2 THEN $ 
     
    265265    endif 
    266266endif 
    267 ; print, 'temps tri triangles', systime(1)-t1  
    268 ;------------------------------------------------------------ 
    269 ; When key_periodic equal 1, triang is a list of indexes's array which  
     267; print, 'temps tri triangles', systime(1)-t1 
     268;------------------------------------------------------------ 
     269; When key_periodic equal 1, triang is a list of indexes's array which 
    270270; have a surplus column. 
    271 ; We have to put it back to the initial matrix by putting indexes of  
     271; We have to put it back to the initial matrix by putting indexes of 
    272272; the last column equal to these of the last column... 
    273273;------------------------------------------------------------ 
    274274tempdeux = systime(1)           ; For key_performance =2 
    275275if keyword_set(key_periodic)*(nx-1 EQ jpi) $ 
    276   AND NOT keyword_set(basic) then BEGIN  
     276  AND NOT keyword_set(basic) then BEGIN 
    277277    indicey = triang/nx 
    278278    indicex = triang-indicey*nx 
     
    310310IF NOT keyword_set(key_forgetold) THEN BEGIN 
    311311   @updateold 
    312 ENDIF  
    313  
    314 IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun  
     312ENDIF 
     313 
     314IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun 
    315315 
    316316return, triang 
    317317 
    318 END  
     318END 
Note: See TracChangeset for help on using the changeset viewer.