|Re: [eigen] Rigid transformations in eigen: use of dual quaternions|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Rigid transformations in eigen: use of dual quaternions
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 12 Sep 2009 13:39:04 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=HCdbzyFhdfcDrqKHBeSqJ8E2ySzlgJ3sHkj4anAnJBQ=; b=ZuWZSXQqTvvVfisDE/dHBJ7a+UpAPvN8EVZNI247znNLOXxsOEl7B2HDMui3CHBEG6 OXB+ZU/aW6Y2kQXQDmOSk7tx/gIxZ5Ye86idPyQA3k/kA3lWt/CBDUzJADQkvYUq0ehj vaJYVqDGHFrjOqSSUN0SRajUBVvtA/bSCsvlg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BUTpv6g4ngEO6vREYTp8DvmAXHZo/9bb7Gi0vYafoOw3uToYSY4NNi+vjrPf7nHSR/ c1WiOxh+7XXUDGm6jJWa1JaQko5CCss3R9jfIb0wceDW/8kyffFHCN9lsto9XZhYX4BC 2fu26IC+km/o0+i4tgkNLD87eEjnLfRAj3ZJo=
2009/9/12 Rohit Garg <rpg.314@xxxxxxxxx>:
>> For a N-dimensional transformation, in Affine and Projective modes,
>> it's internally represented as a (N+1)*(N+1) matrix.
>> In AffineCompact mode it's a N*(N+1) matrix.
>> The top-left N*N block is the linear part, the last column contains
>> the translation part. Exactly like with OpenGL.
>>> b) I am right now rolling my own dual quaternion class, but if eigen
>>> provides dual quaternions (say as RigidTransform class, to exclude
>>> scaling) then it would be very useful indeed.
>>> c) Dual quaternions have many advantages, in that they allow artifact
>>> free skining, rigid transform interpolation, are resistant to
>>> numerical defects (just like quaternions). Was their use considered
>>> and discarded?
>> Sorry, I have no clue what dual quaternions are. I don't remember them
>> being considered. Can you detail what they are and how they are better
>> than existing Eigen classes for real use cases? What is skining? What
>> does "rigid" mean here?
> For what-are-dual-quaternions, look at the paper here
Hm that page wasn't very explicit, but I found this:
Now I understand that this notion makes a lot of sense and is useful
to have in Geometry. They are also simple to describe theoretically,
as they're of the form q1 + epsilon * q2 where q1,q2 are quaternions
and epsilon is subject to the algebraic rule epsilon^2=0.
Quote from the wikipedia: "Similar to the way that rotations in 3D
space can be represented by quaternions of unit length, rigid motions
in 3D space can be represented by dual quaternions of unit length."
So i'd say, green light to add a dual quaternion class to Geometry.
> If you understand quaternions, you'll understand dual qaternions too.
> Considering that you are a math grad student, you'll understand the
> paper more than I did. :)
Hm it's been a while since I was a grad student, but yes my major is math :)
> Rigid transformation is transformation that preserves a rigid body (ie
> distance and angle preserving). Translation, rotations, reflections
> do. Scaling and shearing don't.
Oh, I see. So what they call a "rigid transformation" is what's been
called an isometry for a century. Why do computer scientists have to
rename everything ? :)
In the present case, we're talking about a transformation from a
vector space to itself, so an isometry is exactly a transformation of
x -----> u*x + t
where u is a unitary matrix and t is the translation vector
> Suppose you have a geometric object in posA and you know it's final
> position posB. With matrices, you'd have to interpolate between
> matrices ( a bad idea). With dual quaternions, you can do something
> like slerp for normal quaternions. So they help in animation where you
> want to specify only the initial and final transform matrices and let
> math work out the in between stuff.
I see, interesting indeed.
> Skinning is a technique to perform rigid transformation for meshes, as
> in games, used to move arms/legs etc.
> All in all, dual quaternions are to rigid transformations what
> quaternions are to 3D rotations. The biggest advantage is to treat
> rotation and translation in a unified framework.
If it were just that, we have the Transform class. But I understand
that the dual quaternion representation allows for that interesting
slerp-like interpolation, i can believe it's useful, and dual
quaternions have a wikipedia page mentioning applications to 3D
graphics, so, no need to convince me any more than that. I'd say, go