ToBeReviewed/TRIANGULATION/
triangule_c.pro
Construct the triangulation array.
The idea is: construct a list of triangle which link points between them.
This is automatically done by the function TRIANGULATE
Here:
we consider the fact that points are disposed on a grid (regular or not,
but not unstructured, that is to say that points are written following a
rectangular matrix). A easy way to do triangles between all points is then:
for each point (i,j) of the matrix -except those of the last line and of
the last column- we call rectangle (i,j) the rectangle made of the four
points (i,j), (i+1,j), (i,j+1), (i+1,j+1). To trace all triangle, we just
have to trace the 2 triangles contained in rectangles (i,j)
We notice that each rectangle (i,j) have 2 diagonals (it is true... Make a
drawing to make sure!!), so there are two possible choice for each rectangle
we want to cut in 2 triangles...
It is thanks to this choice that we will be able to trace coast with right
angles. At each angle of coast remarkable by the existence of an unique land
point or of an unique ocean point on one of the four summit of a rectangle (i,j),
we have to cut the rectangle following the diagonal passing by this point.
triangule_c
Graphics
result = triangule_c([maskentree], COINMONTE=array, COINDESCEND=array, BASIC=BASIC, KEEP_CONT=KEEP_CONT)
Return value
res: tableau 2d (3,nbre de triangles).
Each line of res represent indexes of points constituting summits of a triangle.
See how we trace triangles in definetri.pro
Parameters
maskentree
in
optional
type: 2d array
It is a 2d array which will serve to mask the field we will trace after with CONTOUR,
...TRIANGULATION=triangule(mask)
If this argument is not specified, the function use tmask
Keywords
COINMONTE
type: array
To obtain the array of "ascending land corner" to be treated with
completecointerre.pro in the variable array instead of make it pass by the global
variable twin_corners_up.
COINDESCEND
type: array
See COINMONTE
BASIC
Specify that the mask is on a basic grid (use the triangulation for vertical cuts and hovmoellers)
KEEP_CONT
To keep the triangulation even on the continents
Version history
Version
$Id: triangule_c.pro 370 2008-08-07 07:59:15Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
26/4/1999
Known issues
Todo items
seb L.267->268 je ne pense pas que ce soit ce que tu voulais dire mais
c'est la traduction de ce qu'il y avait écrit. Correction si besoin.
Restrictions
Data whose we want to do the contour must be disposed in a matrix.
On the other hand, in the matrix, the points's arrangement can not be
irregular. If it is, use TRIANGULE.
Other attributes
Uses routines
common
different
definetri
Produced by IDLdoc 2.0.