The triangle is the basic constituent (beside nodes...) of triangular grids. All triangles of a layer are stored in an array of triangle structures. parent/daughter-relationships are realised via ID lists that point to the relatives. Triangles may have daughter triangles. Then they do not have nodes, since the daughter triangles have nodes.
Field | Type | Units | Description |
---|---|---|---|
.id | number | - | is the ID of the triangle itself. Initialized with a proper ID from MKCREATEID |
.active | flag | predefined values | This flag defines if a triangle acive or inactive.
Inactive triangles are not modified by the grid
iterations routines and will therefore 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 | (counter) | 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 | (ID) | This is the ID of the parent triangle or NaN if the triangle has no parent. Initialized with NaN. |
.childtype | string | predefined values in lower type | 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'. NOTE that childtype strings have to be in lower type! |
.child | numeric array | (IDs) | 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 | (IDs) | 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 plane defined by the three nodes but an angle measured on a spherical surface! |