Contouring of Non-Regular Three-Dimensional Data

Create contour lines for a non regular series of points, potentially from a non-regular canvas.

CRAN_Status_Badge Downloads Create contour lines for a non regular series of points, potentially from a non-regular canvas.

The contoureR package executes linear interpolation on a delaunay triangulated mesh strung between three-dimensional (3D) points supplied by the user. Contours are calculated across the surface constrained by the convex hull of the supplied data.

Usually, the well known functions such as contourLines from the grDevices package, expect (or rather, require) data to be regular, this means that a rectangular array or matrix of x and y coordinate pairs, each with a corresponding z value is to be modelled – that is to say the cartesian product of a numeric vector of x values of length n, with a numeric vector of y values having length m, used to produce a set of (m x n) unique points that have been concurrently provided with exactly (m x n) z values.

By restricting values to the above format, this in turn limits the region of analysis to square/rectangular canvasses (ie plane defined by geometric and orthogonal vectors parallel to the x and y axes and range bound by the [xmin,xmax] and [ymin,ymax] in the above x and y input numeric vectors, respectively). This restriction, from time-to-time, can be very inconvenient, and is a primary objective and purpose for the creation of this package.

As suggested in the previous paragraph, the contoureR package, on the other hand, has no such orthogonality / regularity requirement and can therefore be applied over obscurely shaped regions such as triangles, circles, polygons and the like.

For further examples and documentation, please proceed to the contoureR website.


contoureR 1.0.2

  • Added criteria for critical aspect ratio of Del's that touch the convex hull
  • Implemented Andrews Monotone Convex Hull Algorithm
  • Fixed a bugs in interpolation of Del's in the proximity to the convex hull

contoureR 1.0.1

  • The initial version submitted to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.5 by Nicholas Hamilton, 6 years ago

Browse source code at

Authors: Nicholas Hamilton

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Rcpp, reshape, plyr

Depends on geometry

Suggests ggplot2

Linking to Rcpp

System requirements: C++11

See at CRAN