Download Technical Report Series

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Technical Report Series
Rapporto di Ricerca DAIS-2011-2
Aprile 2011
Andrea Torsello
Point Invariance of the Screw
Tension Minimizer
Point Invariance of the Screw Tension Minimizer
Andrea Torsello
Abstract
In this report we prove that the screw average b̂ = ScAVG(q̂1 , · · · , q̂n )
of unit dual quaternions q̂1 , · · · , q̂n minimize the screw tension, i.e., the
sum of the squared length of the screw motions that any point p ∈ IR3
is subject to under the rigid transformations q̂1 b̂∗ , · · · , q̂n b̂∗ , regardless of
the actual position of point p.
1
Preliminaries
Before proving the main result we shall introduce a few preliminary notions.
1.1
Quaternions
Quaternions have been a popular geometrical tool for more than 20 years as
they represent 3D rotations in a way that is arguably more efficient and robust
than 3 × 3 rotation matrices [5]. Quaternions are an algebraic extension of
complex numbers with 3 imaginary bases i, j, and k, thus a quaternion is a
number of the form q = a + ix + jy + kz. The multiplication of two quaternions
is defined through the following multiplication rules for the three imaginary
bases: i2 = j 2 = k 2 = −1, ij = k = −ji, jk = i = −kj, ki = j = −ik.
∗
The conjugate of a quaternion q = a + ix + jy + kz is the quaternion
√ q∗ =
a − ix −p
jy − kz, while the norm of a quaternion is the quantity ||q|| = qq =
√ ∗
q q = a2 + x2 + y 2 + z 2 . This norm is equivalent to the Euclidean norm of
the quaternion expressed as a vector in IR4 . Quaternions with unitary norm are
called unit quaternions. In the following we will use the vectorial representation
of quaternions: Let i = (i, j, k) be the row-vector of the imaginary bases, we can
write the quaternion q as a + iv, where v = (x, y, z)T is a 3D vector. A righthanded 3D rotation of angle θ around the axis of unit vector v is in relation with
the unit quaternion q = cos(θ/2) + sin(θ/2)iv. In fact, let p = (px , py , pz )T be
a 3D point and pr its rotation, we have ipr = q(ip)q ∗ . The ring of quaternions,
however, is a dual cover of the group SO(3) of 3D rotations, as q and −q
represent the same rotation.
1.2
Dual Quaternions
Dual numbers are an algebraic extension of real number much like complex
numbers are an extension of the real numbers. They are defined in terms of
the dual base that satisfies 2 = 0; a dual number is thus a number of the
form a + b for a, b ∈ IR. The multiplication is commutative, (a + b)(c + d) =
ab + (ad + cb) = (c + d)(a + b), and the inverse of a dual number a + b is
1
Table 1: Multiplicative table of dual quaternions.
1
i
j
k
i
j
k
1
1
i
j
k
i
j
k
i
i
−1
−k
j
i
−
−k
j
j
j
k
−1
−i
j
k
−
−i
k
k
−j
i
−1
k
−j
i
−
i
j
k
0
0
0
0
i
i
−
−k
j
0
0
0
0
j
j
k
−
−i
0
0
0
0
k
k
−j
i
−
0
0
0
0
1
a
− ab2 if a 6= 0, while dual numbers with zero real part are not invertible and
divide 0, i.e., (a)(b) = 0 for all a, b ∈ IR.
The conjugate of a dual number a + b is the dual number a + b = a − b.
It is easy to verify that ab = ab for any pair of dual numbers a and b.
Trigonometric functions can be generalized to dual numbers through their
Taylor expansion, resulting in the following identities:
cos(θ0 + θ )
=
cos(θ0 ) − θ sin(θ0 ) ;
(1)
sin(θ0 + θ )
=
sin(θ0 ) + θ cos(θ0 ) .
(2)
Dual quaternions are an algebraic extension of quaternions and can equivalently seen as a quaternion on dual numbers, i.e., a + ib + jc + kd where a, b, c,
and d are dual number, or a dual combination of two quaternion, i.e., q0 + q
where q0 and q are regular real quaternions. In the following, when the dual
base is not explicit, we will denote dual number and dual quaternions with a hat
as in q̂. The product of dual quaternions follows the usual multiplication rules
for the imaginary and dual bases, with the added constraint that the dual and
imaginary bass commute, resulting in the multiplicative table shown in Table 1.
Dual quaternions inherit conjugation from both quaternions and dual numbers:
q̂ ∗ = (q0 + q )∗
=
q0∗ + q∗ ;
(3)
q̂ = (q0 + q )
=
q0 − q .
(4)
It easy to show that the two conjugation commute, i.e., q̂ ∗ = (q̂)∗ , resulting
in three distinct conjugates of a dual quaternion. Moreover, the quaternion
conjugation reverses the order of multiplication, while the dual conjugation
maintains it:
(q̂ p̂)∗
(q̂ p̂)
= p̂∗ q̂ ∗ ;
(5)
=
(6)
(q̂)(p̂) .
Dual quaternion have a seminorm defined as
kq̂k =
p
q̂ ∗ q̂ =
p
kq0 k2 + 2(q0 · q ) = kq0 k + q0 · q
,
kq0 k
(7)
where q0 · q is the dot product of the quaternions q0 and q as vectors in
IR4 . Note that, as opposed to real quaternions where norm and Euclidean
norm coincide, the seminorm of the dual quaternions is strictly smaller than the
2
Euclidean norm of their vectorial representation. a dual quaternion q̂ = q0 · q
has zero seminorm if and only if kq0 k = 0, while it has unit length if and only
if kq0 k = 1 and q0 · q = 0. A dual quaternion with unit norm is called a unit
q̂ ∗
dual quaternion. The inverse of a dual quaternion q̂ is q̂ −1 = kq̂k
2 and for unit
dual quaternions inversion coincides with quaternion conjugation.
1.3
Unit Dual Quaternions and 3D Rigid Transformations
The algebraic structure of unit dual quaternions is related to the group SE(3)
of 3D rigid transformations [2] making them an efficient tool for 3D transformations. In fact, the rigid transformation obtained by a rotation defined by the
unit quaternion r and then a translation by t = (tx , ty , tz )T , can be represented
by the dual quaternion
q̂ = r + 21 (it)r .
In fact, if we represent a 3D point p as 1 + ip, the following holds:
∗
r + 12 itr (1 + ip) r + 12 itr = r + 12 itr + rip r∗ − 12 r∗ (it)∗ =
r + 12 itr + rip r∗ + 12 r∗ it = 1 + (ripr∗ + it) . (8)
Thus, 1+ip, i.e., the dual quaternion representation of the point p, gets mapped
into the dual quaternion 1 + (ripr∗ + it), which is the representation of p after
the rotation and translation have been applied. In fact, in usual quaternion
notation, ripr∗ represents the rotation by r, while the addition of it takes care
of the subsequent translation. Further, any unit dual quaternion represents a
rigid transformation.
A famous result by Chasles [1] states that any rigid transformation is in
fact a screw motion, i.e., a rotation around an axis placed anywhere in the 3D
space, and a translation along the direction of the axis. Unit dual quaternions
represent directly the parameters of such a screw motion. In fact, any unit dual
quaternion can be represented in the form
cos θ̂ + iŝ sin θ̂
(9)
where θ̂ = θ0 + θ is a dual number representing the quantity of motion, while
iŝ = is0 + is is a dual quaternion with zero scalar part representing the axis
parameters. In particular, θ0 represents the angle of rotation around and θ
represents the amount of translation along the axis, s0 is the direction of the
axis of rotation, while s represents the axis position, where s = d × s0 for any
point d in the axis.
The unit dual quaternions form a 6-dimensional manifold in IR8 for which we
can define the exponential and logarithm maps. Let p̂ = ŝ θ̂2 be a non-zero dual
quaternion with zero scalar part, the exponential of p̂ is the unit dual quaternion
exp(p̂) = cos θ̂2 + ŝ sin θ̂2 .
(10)
Similarly, given a unit dual quaternion q̂ = cos θ̂2 + ŝ sin θ̂2 we define its logarithm
as:
log(q̂) = ŝ θ̂2 .
(11)
3
In [4, 3] the authors present ScLERP, a generalization of the SLERP interpolation algorithm for dual quaternions which is based on the exponential
and logarithm maps. In particular, the interpolation between two unit dual
quaternions p̂ and q̂ is defined as:
ScLERP(p̂, q̂, t) = (q̂ p̂∗ )t p̂ = exp(t log(q̂ p̂∗ ))p̂
(12)
for any t ∈ [0, 1].
Let α(t), a(t), δ(t), and d(t) be respectively the rotation angle and axis, and
the translation magnitude and direction, then ScLERP was shown to have the
following properties:
• shortest path: a(t), and d(t) are constant and α(t) ∈ [−π; π];
• constant sped:
d
dt α(t)
= 0 and
d
dt δ(t)
= 0.
Further, it is invariant to changes in the coordinate system.
In [4] was presented an iterative algorithm called Dual quaternion Iterative
Blending (DIB) for averaging dual quaternions in a way that minimizes the
(weighted) squared geodesic distances between the target mean and the input
quaternions in the unit dual quaternion manifold. The algorithm starts from the
linear average of the unit dual quaternions q̂1 , · · · , q̂n and iteratively updates
the mean b̂ until
n
X
log(q̂i b̂∗ ) = 0 .
(13)
i=1
We define such dual quaternion b̂ as the screw average of q̂1 , · · · , q̂n , and write
b̂ = ScAVG(q̂1 , · · · , q̂n ) .
2
(14)
Main Result
Lemma 1 The length of a screw path of a point p ∈ IR3 under the rigid transformation associated with the unit dual quaternion q̂ is
dSC (q̂, 1, p̂) = log(q̂) p̂ − p̂ log(q̂)
2
where p̂ = (1 + ip) is the unit dual quaternion associated with p and kq̂k2 is
the Euclidean norm of the dual quaternion q̂ interpreted as a vector in IR8 .
Proof The screw distance dSC (q̂, p̂) is defined as the length of the screw path
that takes point p̂ from its position to its final position after applying the rigid
transformation q̂. The screw path of point p̂ through transformation q̂ can be
expressed using ScLERP interpolation as q̂ t p̂ (q̂ t )∗ for t ∈ [0, 1], thus the length
of this path can be obtained by integrating its time derivative
Z 1
d t
t
∗
dSC (q̂, p̂) =
dt q̂ p̂ (q̂ ) dt .
0
2
Note that q̂ t p̂ (q̂ t )∗ represents a position in 3D space, thus will be of the form
1 + is for some s ∈ IR3 . Consequently, its derivative will have non-zero elements only in correspondence to the dual imaginary components i, j, and k.
4
d t
Further, since ScLERP is constant speed, we already know that dt
q̂ p̂ (q̂ t )∗ 2
must not depend on t. Expanding the time derivative, we obtain:
Z 1
Z 1
d t
d
t
∗
dSC (q̂, p̂) =
dt q̂ p̂ (q̂ ) dt =
dt exp(t log(q̂)) p̂ exp(−t log(q̂)) dt
0
0
2
2
Z 1
=
exp(t log(q̂)) log(q̂) p̂ − p̂ log(q̂) exp(−t log(q̂)) dt . (15)
2
0
The term log(q̂) p̂ − p̂ log(q̂) is the time derivative of the path at time t = 0
and as such has non-zero components only in conjunction of the dual imagθ0 +θ
θ̂
inary components.
= 21 θ0 is0 +
In fact, let log q̂ = ŝ 2 = i(s0 + s ) 2
(θ0 is + θ is0 ) , we have
(1 + ip) 21
1
2
θ0 is0 + (θ0 is + θ is0 ) (1 + ip)−
θ0 is0 − (θ0 is + θ is0 ) = θ is0 + θ0 i (s − p × s0 )
log(q̂) p̂ − p̂ log(q̂) =
(16)
Now, since log(q̂) p̂ − p̂ log(q̂) is in the form is for some s ∈ IR3 , it is easy
to show that
t
q̂ log(q̂) p̂ − p̂ log(q̂) (q̂ t )∗ = log(q̂) p̂ − p̂ log(q̂) ,
2
2
t
in fact, let q̂ = r0 + r for some quaternions r0 and r , we have
q̂ t log(q̂) p̂ − p̂ log(q̂) (q̂ t )∗ = (r0 + r )(is)(r0∗ − r∗ ) = r0 (is)r0∗
which is just a rotation of the time derivative (is) = log(q̂) p̂ − p̂ log(q̂), and
thus does not change its Euclidean norm. Hence, we have
Z 1
dSC (q, p) =
exp(t log(q̂)) log(q̂) p̂ − p̂ log(q̂) exp(−t log(q̂)) dt =
2
0
Z 1
log(q̂) p̂ − p̂ log(q̂) dt = log(q̂) p̂ − p̂ log(q̂) . (17)
2
0
2
Using (16) , and recalling that s = d × s0 for a point d in the rotation axis,
we can get a familiar expression for the length of the (squared) screw length
2
dSC (q, p)2 = log(q̂) p̂ − p̂ log(q̂) = k θ is0 + θ0 i (s − p × s0 ) k22 =
2
θ2 + θ02 k(d − p) × s0 k22
{z
}
|
(18)
r2
where θ is the amount of translation along the axis, θ0 is the angle of rotation
and r = k(d − p) × s0 k2 is the distance of point p to the axis.
We can now prove the following
Theorem 1 (Point-Invariance of the Screw Tension Minimizer)
Let qˆ1 , . . . , q̂n be dual quaternions, the screw average b = ScAVG(q1 , . . . , qn )
minimizes the screw tension
X
TSC (q̂1 , . . . , q̂n , b̂, p̂) =
dSC (q̂i b̂∗ , p̂)2
i
5
for any point p ∈ IR3 and the related unit dual quaternion p̂ = 1 + ip.
Proof To prove that b̂ minimizes TSC (q̂1 , . . . , q̂n , b̂, p̂) regardless of p̂, we need
to show that ∇b̂ TSC (q̂1 , . . . , q̂n , b̂, p̂) = 0. Since b̂ is arbitrary in the space of
unit dual quaternions, without loss of generality we can compute the gradient
with respect to its inverse b̂∗ , thus obtaining:
∇b̂∗ TSC (q̂1 , . . . , q̂n , b̂, p̂) =
X
∇b̂∗ dSC (q̂i b̂∗ , p̂)2 =
i
X
2
∇b̂∗ log(q̂i b̂∗ ) p̂ − p̂ log(q̂i b̂∗ ) =
2
i
"
X
∇b̂∗
∗
log(q̂i b̂ ) p̂ − p̂ log(q̂i
· log(q̂i b̂∗ ) p̂ − p̂ log(q̂i b̂∗ )
b̂∗ )
#
=
i
X 2 ∇b̂∗ log(q̂i b̂∗ ) p̂ − p̂ ∇b̂∗ log(q̂i b̂∗ ) · log(q̂i b̂∗ ) p̂ − p̂ log(q̂i b̂∗ ) =
i
2
X
(q̂i b̂∗ )∗ q̂i # p̂ − p̂ (q̂i b̂∗ )∗ q̂i # · log(q̂i b̂∗ ) p̂ − p̂ log(q̂i b̂∗ ) =
i
2
X
b̂ # p̂ − p̂ b̂ # · log(q̂i b̂∗ ) p̂ − p̂ log(q̂i b̂∗ ) =
i

2 b̂ # p̂ − p̂ b̂ # · 
!
!
X
i
log(q̂i b̂∗ )
p̂ − p̂
X
log(q̂i b̂∗ ) 
i
where # = ∇x x is the identity function for which holds # · y = y for any vector
y.
P
We can see that, for any point p̂, the gradient is zero whenever i log(q̂i b̂∗ ) =
0, i.e., when b̂ is the screw average of the quaternions q̂1 , . . . , q̂n .
References
[1] M. Chasles. Note sur les propriétés générales du système de deux corps
semblables entr’eux et placés d’une manière quelconque dans l’espace; et sur
le déplacement fini ou infiniment petit d’un corps solide libre. Bulletin des
Sciences Mathematiques, Astronomiques, Physiques et Chimiques, 14:321–
326, 1830.
[2] W. Clifford. Mathematical Papers. Macmillan, London, 1882.
[3] L. Kavan, S. Collins, J. J. Žára, and C. O’Sullivan. Geometric skinning
with approximate dual quaternion blending. ACM Trans. Graph., 27(4):105,
2008.
[4] L. Kavan, S. Collins, C. O’Sullivan, and J. Žára. Dual quaternions for
rigid transformation blending. Technical Report TCD-CS-2006-46, Trinity
College Dublin, 2006.
[5] K. Shoemake. Animating rotation with quaternion curves. In Proc. of the
12th annual conference on Computer graphics and interactive techniques,
pages 245–254, 1985.
6