It's a pretty nifty concept. Had to use this type of processing a couple years ago when doing some calculations that involved rotating azimuth/elevation/distance values around a sphere. Fortunately, I was able to find a nicely-licensed C implementation in
https://github.com/smonkewitz/scisql that was originally intended for embedded use in a database.