I have data that is a set of triangles with a value assigned to each triangle that I would like to contour. One way to do that is to convert the data to a regular grid. This is output from a fault slip model. I looked at the GMT functions
triangulate, but those are for data measured at points so they do new triangulations and then interpolate between the points. I already have triangles and the values are for the triangles, not the vertices.
One of the functions of the modeling software that I use writes out the triangles with their “Z” values in a text format that can be plotted with the GMT
psxy -C$cpt command (see below), but I wonder if there is a way to make a regular grid out of the “Z” values. Do I have to convert the triangles that I have back to a set of points that are the centroids of each triangular patch and then put that into the regular gridding functions of GMT?