The example "ctex02" produces ten frames illustrating the use of CONPACKT to draw contours on a planar triangular mesh that is created in such a way as to fill an area having an irregular boundary, including some holes. The area chosen is, by default, the conterminous 48 states of the US, as seen on an orthographic projection of the globe (but the program could easily be modified to work for an area defined differently):

The NCAR Graphics package EZMAP is initialized to define the desired view of the globe and the package AREAS is used to produce an area map representing that view. The area map resides in a labelled COMMON block shared with a function, ISPOTM(X,Y), which can be called to determine whether or not a point (X,Y), in the user coordinate system, is in the part of the map representing the United States.

A mesh is created by tiling the GKS window with equilateral triangles having sides of length SIDE (expressed as a fraction of the width of the window), omitting all triangles that fall entirely outside the United States, and modifying those that lie partly inside and partly outside it. The resulting triangles are delivered to the CONPACKT routine CTTMTL, which actually creates the triangular mesh structure.

Meshes are created for several different values of SIDE, as determined by values in a PARAMETER statement. At each resolution, three pictures are drawn, showing: 1) the mesh itself; 2) simple contours; and 3) colored contour bands.

SIDE = .04:

SIDE = .01:

SIDE = .0025: