1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; NAME:dessinetri |
---|
6 | ; |
---|
7 | ; PURPOSE:dessine la triangulation |
---|
8 | ; |
---|
9 | ; CATEGORY:pour comprendre comment ca marche |
---|
10 | ; |
---|
11 | ; CALLING SEQUENCE:dessinetri [, tri, x, y] |
---|
12 | ; |
---|
13 | ; INPUTS:optionnels |
---|
14 | ; par defaut on choisit la triangulation qui est utilise pour |
---|
15 | ; les plots et on la trace aux points definites par vargrid |
---|
16 | ; |
---|
17 | ; sinon il faut fournir les tableaux |
---|
18 | ; tri definissant la triangulation (fournis par triangule.pro |
---|
19 | ; ou triangulate) |
---|
20 | ; x et y qui sont les positions de points a laquelle se raporte |
---|
21 | ; la triangulation (cf. les tableau x et y fournis ds |
---|
22 | ; triangulate) |
---|
23 | ; |
---|
24 | ; KEYWORD PARAMETERS: tous ceux de plots |
---|
25 | ; |
---|
26 | ; OUTPUTS: |
---|
27 | ; |
---|
28 | ; COMMON BLOCKS:common.pro |
---|
29 | ; |
---|
30 | ; SIDE EFFECTS: |
---|
31 | ; |
---|
32 | ; RESTRICTIONS: |
---|
33 | ; |
---|
34 | ; EXAMPLE: |
---|
35 | ; |
---|
36 | ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
37 | ; |
---|
38 | ;- |
---|
39 | ;------------------------------------------------------------ |
---|
40 | ;------------------------------------------------------------ |
---|
41 | ;------------------------------------------------------------ |
---|
42 | |
---|
43 | PRO dessinetri, tri, x, y, _extra = ex |
---|
44 | @common |
---|
45 | tempsun = systime(1) ; pour key_performance |
---|
46 | |
---|
47 | if n_params() EQ 3 then begin |
---|
48 | glam = x |
---|
49 | gphi = y |
---|
50 | ENDIF ELSE BEGIN |
---|
51 | grille,mask,glam,gphi, tri = tri |
---|
52 | undefine, mask |
---|
53 | tri = ciseauxtri(tri, glam, gphi) |
---|
54 | ENDELSE |
---|
55 | |
---|
56 | tempdeux = systime(1) ; pour key_performance =2 |
---|
57 | for i = 0L, n_elements(tri)/3-1 do begin |
---|
58 | t = [tri[*, i], tri[0, i]] |
---|
59 | ; plots, glam[t], gphi[t], color = i MOD 255, _extra = ex |
---|
60 | ; wait, .1 |
---|
61 | plots, glam[t], gphi[t], color = 0, _extra = ex |
---|
62 | ENDFOR |
---|
63 | IF testvar(var = key_performance) EQ 2 THEN $ |
---|
64 | print, 'temps dessinetri: trace des triangles', systime(1)-tempdeux |
---|
65 | ; |
---|
66 | if keyword_set(key_performance) THEN print, 'temps dessinetri', systime(1)-tempsun |
---|
67 | |
---|
68 | return |
---|
69 | end |
---|