Stripy: A Python Module for (Constrained) Triangulation in Cartesian Coordinates and on a Sphere

Date

Authors

Moresi, Louis
Mather, B.

Journal Title

Journal ISSN

Volume Title

Publisher

Open Journals

Abstract

The triangulation of scattered points is a common problem in science and engineering when local neighbourhood information is required for computation. Typical applications include the calculation of neighbour relationships, interpolants, derivatives, and smoothly-fitting surfaces. A more specialised problem is the triangulation of points distributed on the surface of a sphere, nevertheless, this is important in most global geographical applications where data are registered in longitude and latitude and the Earth’s ellipticity can be considered as a second order effect. Our package, stripy, is a python, numpy-based interface to the TRIPACK and STRIPACK Fortran code for (constrained) triangulation in Cartesian coordinates and on a sphere, respectively (Renka, 1996a, 1997a) and includes routines from SRFPACK and SSRFPACK for interpolation (nearest neighbour, linear, and hermite cubic) and to evaluate derivatives (Renka, 1996b, 1997b). Our focus in developing an augmented set of wrappers for a venerable and widely used set of fortran subroutines has been on ease of use so that triangulated or scattered data on the sphere can be brought quickly into interactive jupyter notebooks for analysis and interrogation. stripy is an object-oriented package that extends the functionality of the original collection of subroutine by adding a number of useful tools such as the construction of regular meshes on the sphere (icosahedral and octahedral each with face-centre-point variants, a triangulated cube and a truncated icosahedron with face-centre points that produces a C60 / soccerball mesh). stripy also includes functionality to refine meshes globally and locally by triangle or edge subdivision. We have taken some care to ensure that queries on the triangulations are vectorised within numpy queries. stripy offers a consistent API between the two coordinate system so users can transfer from Cartesian to spherical coordinates with minor changes to their code. stripy includes the following functionality: • Spherical and Cartesian triangulation of scattered points. • Construction of Cartesian and Spherical meshes. • Nearest-neighbour, linear, and hermite cubic interpolation. • Evaluation of derivatives. • Smoothing operations. • Mesh refinement on line segments / triangle centroids. • Fast point location with k-d tree interface with angular separation metric on the sphere

Description

Keywords

Citation

Source

The Journal of Open Source Software

Book Title

Entity type

Access Statement

Open Access

License Rights

Creative Commons Attribution 4.0 International License (CC-BY)

Restricted until