532 FUNDAMENTAL ALGORITHMS FOR NONLINEAR PRODUCTS CHAPTER 21
21.4 LOGARITHM OF VERSORS
We do not know of a general algorithm for computing the logarithm of arbitrary versors.
However, for many useful cases a closed-form solution was found; see, for example,
Section 10.3.3 (rotation), Section 13.5.3 (rigid body motion), and Section 16.3.4 (pos-
itively scaled rigid body motion). We have not yet included these logarithms in our refer-
ence implementation, but you can find a C++ implementation of these logarithms in the
GA sandbox source code package.
21.5 MULTIVECTOR CLASSIFICATION
At times, it may be useful to have an algorithm that classifies a multivector as either a
blade, a versor, or a nonversor. For instance, classification is useful as a sanity check of
interactive input, or to verify whether and how a result could be displayed geometrically.
Yet testing whether a multivector is a versor or a blade is nontrivial in our additive
representation. A blade test requiring that the multivector is of a single grade is insufficient
(for example, e
1
∧ e
2
+ e
3
∧ e
4
is of unifor m grade 2, but not a blade). Adding the rule that
the square of the multivector must be a scalar does not help (since e
1
∧e
2
∧e
3
+ e
4
∧e
5
∧e
6
squares to −2 in a Euclidean metric, but it is not a blade).
The classification algorithm below (from [7]) performs this test correctly. It is one algo-
rithm that can be used either for the versor test or for the blade test. It is natural that these
tests should structurally be very similar, for all invertible blades are also versors. As you
glance through it, you notice that the algorithm uses inverses. This is fine for a versor test,
since versors need to be invertible by definition. However, a blade need not be invertible,
and yet null blades are still blades.
In fact, “being a blade” is defined as “factorizable by the outer product”, and that
does not depend on a metric at all. Our reference [7] makes good use of this freedom:
if you are testing whether V is a blade, you must perform the geometric products in
the algorithm using a Euclidean metric. This choice of convenience eliminates all null
blades that would have had to be taken into account without actually affecting factor-
izability, and that simplifies the algorithm. (As an example, the multivector e
1
∧∞ is
a blade, but in the conformal metric contains a null factor ∞. This makes the blade
noninvertible, but it is of course still a blade. By using a Euclidean metric, ∞ is treated
as a regular vector, the blade becomes invertible, and the test can run as it would for
e
1
∧ e
2
).
On the other hand, determining whether a multivector V is a versor (i.e., a geometric
product of invertible vectors) clearly depends on the precise properties of the metric.
So for a versor test, you have to run this algorithm in the actual metric of the algebra
of the versor.