Introduction#

This is the documentation for the splines module for Python. However, instead of a Python module with a bit of documentation, this project is mostly documentation, with a bit of Python module at the side. The goal is not so much to provide a turn-key software for using splines, but rather to provide the background and mathematical derivations for fully understanding the presented types of splines and their inter-relations. The Python module serves mostly for experimenting further with the presented ideas and methods. Therefore, the implementation is not focused on efficiency.

The documentation consists of two main parts. The first part investigates some polynomial splines in their natural habitat, the Euclidean space. In the unlikely case you are reading this and don’t know what “spline” means, the first part also contains a definition of the term and a description of some of the common properties of splines. The second part leaves the comfort zone of flat space and tries to apply some of the approaches from the first part to the curved space of rotations. The Python module is similarly split into two parts whose API documentation is available at splines and splines.quaternion, respectively.

This project was originally inspired by Millington [Mil09], who concisely lists the basis matrices (a.k.a. characteristic matrices) of a few common types of splines and also provides matrices that can be used to convert control points between those different types. However, the derivation of those matrices is not shown. Furthermore, the paper only considers uniform curves, where all parameter intervals have a size of 1. One goal of this documentation is to show the derivation of all equations and matrices. The derivations often utilize SymPy to make them more reproducible and to ease further experimentation. A special focus is put on non-uniform splines, which seem to have been neglected in some of the literature and especially in some online resources.

Another focus is the speed along curves. In many applications only the shape (a.k.a. the image) of a curve matters. However, sometimes it is important how fast a point travels along a spline when changing the parameter (which can be interpreted as time). The “timing” of a spline is not visible in a static line plot (as is often used by default). That’s why most of the plots in the following sections will instead use dots at regular parameter intervals, for example 15 dots per second. If a spline already has the desired image but the wrong timing, this can be fixed by Re-Parameterization.

A non-goal of this Python module and its documentation is to cover all possible types of splines. Maybe some additional types will be added in the future, but the list will always stay incomplete. One of the most glaring omissions for now are B-splines, which are mentioned a few times but not properly derived nor implemented. Another family of splines that is missing are rational splines, and therefore also their most popular member NURBS. Spline surfaces are not covered either.