Designing Geometric Algebras - Interpolating Points
Now for an application that makes use of the fact that we can represent arbitrary shapes as GA objects. Let's start with a concrete example. We have three points which are also shown in the figure below. We want to find values for other values of between our three points. This is called interpolation for between our known points, and extrapolation for outside of our known points. In other words, we want to find a curve that reasonably interpolates our points.
Figure 1 - Blue: Points we want to interpolate.
A natural choice for a family of curves are polynomials in , so we will focus on them for now but the procedure outlined in this article will work for any other family of curves too. It turns out that points unique determine the coefficients of a degree polynomial. For our example, is of degree two so its coefficients can be found given three points. The solution we want to find is shown below.
Figure 2 - Blue: Points we want to interpolate. Green: Second degree polynomial interpolating the points.
Representing polynomials in Geometric Algebra
In the first section we learnt that we can represent polynomials in Geometric Algebra by introducing a basis vector for each term of it, including the term. For our concrete example we would have four basis vectors corresponding to and the up function which maps points to vectors in the 4D space is
Finding the interpolating object
Now we can represent points. How do we get an object representing a curve that goes through all points? We know we can join points together to make shapes which go through all of them with the wedge product. In general we have the following equation which results in the pseudovector :
Where is the number of points. This should give us some object representing a shape that goes through all of the points that were joined.
Getting the interpolating polynomial coefficients from the object
We can examine this object by applying the Outer Product Null Space / Join Null Space equation:
To bring it into the usual form we still need to bring on the other side with a coefficient of . We can also get rid of the pseudoscalar . This results in
So indeed our object represents a polynomial. In general, to get the ordinary coefficients from we have
We can see that the coefficients of the polynomial can be directly read off of 's coefficients. This is all that we needed. We wedged together some points into a pseudovector, we know that the object goes through all of our points, and from the pseudovector's coefficients we can easily get the interpolating polynomial's coefficients.
For our concrete example we have the following pseudovector for representing the polynomial
Reading off the coefficients and dividing by 's coefficient yields the interpolating polynomial equation
which corresponds exactly to the green curve in the figure 2.
Algorithm Summary
To summarize the procedure, given N points
- We want to interpolate with a polynomial of degree
with coefficients : - Use GA with N basis vectors and up function:
- Build polynomial object
by wedging together N up projected points: - Extract interpolating polynomial coefficients
from :
Conclusion
We started by looking at what interpolation is and we chose to use polynomials for interpolation. We then applied our knowledge from the previous section to represent polynomials in Geometric Algebra. With the wedge product we constructed an object representing the interpolating polynomial from which we could just read off the coefficients.
This process generalizes to any number of points and it uses only very simple GA operations, so it might be preferable over the usual methods like using matrices or Lagrange polynomials. While we were focusing on polynomials here, this process works identically with other functions too, as no assumptions about the basis functions were made. The only change is to use a different up function.
Next: Design of Geometric Algebras - Tangent Objects
Bonus: Different basis functions
Below I tried some different basis functions for the same three points and five points.