Program: MKLSGRIDNEWTRILIST
mklsgridnewtrilist.........construct empty triangle list
call: tri=mklsgridnewtrilist(cnt,iteration);
cnt: number of triangles to be created.
iteration: iteration number at which the triangles are
generated
result: tri: this is an 1D structure array with CNT elements that
desribes the individual triangles as lists of
parent/child/node IDs.
Each element of the array has the following fields:
.id (number)
is the ID of the triangle itself.
Initialized with a proper ID from MKCREATEID
.active (flag)
This flag defines if a triangle acive or inactive.
Inactive triangles are not modified by the grid
iterations routines and will therefor never get new
child objects.
triangles returned by MKLSGRIDNEWTRILIST will be
initialized active.
defined values:
0: triangle is inactive
1: triangle is active
.iter: (number)
This number gives the number of recursive
refinements that have been applied to this triangle.
iter=0 means that the layer contains only the
original points of octahedron, tetrahedron or
whatever you use to start with.
iter=n means that n iterations have been applied.
.parent (number)
is the ID of the parent triangle or NaN if
the triangle has no parent
Initialized with NaN.
.childtype (string)
describes the type of the triangles childs. This
may be one of the following:
'triangle' if the children of the
triangle are triangles, or
'node' if the children are nodes, or
'empty' if there are no children at all.
Initialized with 'empty'
.child (numeric array)
is a list of child triangle IDs or NaN if the
triangle has no child triangles.
Initialized with [NaN NaN NaN NaN] (a triangle can
have either four child triangles or none).
.nodes (numeric array)
is a row vector of node IDs that point to the nodes
that make up the cornes of the triange, or
Empty or all NaN if the triangle's children are not nodes.
Initialized as [NaN NaN NaN], but emptied after
iteration (when the childtype is switched from
node' to 'triangle').
.cc (numeric array) [deg]
spherical coordinates of the triangles circumcenter
cc(1) is longitude
cc(2) is latitude
The radius is that of the layer.
Note that the circumcircle is a small circle on a
sphere!
.cr (number) [deg]
spherical circumradius of the triangle, computed as
the distance angle between the circumcenter point
and the first node of the triangle.
Note that this radius is not the euclidean radius
as measured in the pane defined by the three nodes
but an angle measured on a spherical surface!
Always use this routine to obtain a triangle list, since only this
routine guarantees that are fields are initialized correctly.
Martin Knapmeyer, 10.09.2004
Read M-File Source Code
eof.