Re: [eigen] Rigid transformations in eigen: use of dual quaternions |
[ Thread Index |
Date 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 14:22:27 -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=8G3ZYf/ASj/WT4ead6Y7xjVYmCbJdqd4XYOu8Mh/iTQ=; b=w1KKwhCxCtDCipVa2WzPF4ZJx4oea2N9t0dn0EjLP/FDX4ZUeFhKqeDjOyEOQx1pDK HY8GMXMrGwmF7reO61JSJq+k3+e6egc+MS1VRIHCDOd6Mubuhw+aews3IfASW+zt9omr zufAl6DX/DfnyQ0szJuAoFjwagzyYC2NrjgRY=
- 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=s0wuzNwV1CZi55fHtb7ozw96SHO08h73JgMvXeLh1JOBykvGE1VPDVOZ8XUlsqd/Lo tSLjoen0o/co1XSxlzCjHVvvz1YBXkD4WoE/W7kc0zMoL9CfiuM8jhcbAuvz2TS4325V hniKaK10Ojg0w/2CyaEMUv0BaK/2A7d1wzRis=
2009/9/12 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2009/9/12 Rohit Garg <rpg.314@xxxxxxxxx>:
>>>> For what-are-dual-quaternions, look at the paper here
>>>>
>>>> http://isg.cs.tcd.ie/projects/DualQuaternions/
>>>
>>> Hm that page wasn't very explicit, but I found this:
>>>
>>> http://en.wikipedia.org/wiki/Dual_quaternion
>>
>> Must have been taken down. Paper attached.
>
> woops, please don't attach heavy files to mails on this list! I'll
> edit the wiki to mention that.
>
> the link wasn't down, i had seen the file, still i found it less
> explicit than the wikipedia page as far as the definition of dual
> quaternions was concerned.
>
>>>> 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
>>> for it!
>>
>> The advantages are cheaper to store, cheaper to compose, more stable
>> and interpolation. In that sense, they correspond to the advantages of
>> quaternions over matrices.
>
> ok, understood.
>
>>
>> Question: can you map a piece of memory as a Quaternion<datatype>
>> (with vectorization)? Like the question I raised earlier today where a
>> vec4i wasn't vectorized.
>
> Hm, no you currently can't. But Eigen can be modified so that you
> could. If you want to give it a try, look at DiagonalMatrix.h, how
> DiagonalMatrix is storing its own coeffs like Quaternion does while
> DiagonalWrapper wraps an existing MatrixBase (which could be a
> Map...).
Ah, I'm stupid. Since that's only for some internal code that you have
to write only once, what do you think of just doing a
reinterpret_cast? That gives the same result with much less hassle!
Like this
float data[4];
reinterpret_cast<Quaternionf*>(data)->slerp(....);
Benoit
>
> Benoit
>