Orthographic projection

Softwares for plotting a grid are usually very good for regular latitude-longitude grids, like NCL or the Basemap package for Python. They can also managed unstructured grids with interpolation. However, it is usually impossible or very slow to draw an non-structured grid without interpolating data.

As I need that for my thesis, I wanted to see how hard it was to code an orthographic projection. For that, I used the cairo library in C for speed. The code could be cleaner (in C++ for example), but it works. Here is a small movie showing we try any projection angles :

The code is available at Github.