Re: [eigen] Rigid Transformations in eigen: discussion thread |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Rigid Transformations in eigen: discussion thread*From*: Rohit Garg <rpg.314@xxxxxxxxx>*Date*: Thu, 17 Sep 2009 14:24:40 +0530*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=F9q2gkp0f9kmpKZtKhnITXVqgGo3bRwFm7aFGrP+6lY=; b=htQt8omD+rcJZ7gOP0NaycW8Q+GEZujixlIWFRJL2umeNc1t+AeqYpxotQ3KV4wo1D CtYHXW0DS4T0HA1r/9EHntj9QQY4P4IxPYxuWELVckUs/dHl5c+wAT3FAJ2oshW3veqM XX9JmW1YSzfDvxslO1Bn/JTMlh75+B1q8IVnk=*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=gX43HsoNDeCq8+IWH84UbnixX23Qfi3V2oqLsKj5Ymc1ZqBAdwTM8l9iP8o5Dkuk6b P9ktkUe9O8hSLsfHgLJnOvXmbpabkvAHDuO5G/MDrHDB30Zc59V2pIFEx9DtfbA5fWQb b0gMhsJOtW5JcUM3lKBX2JdNO6nQkCX1D+a8g=

What do others here think about this. Is the API, the unit tests etc. good enough for inclusion in eigen? On Wed, Sep 16, 2009 at 4:06 PM, Rohit Garg <rpg.314@xxxxxxxxx> wrote: >>> a) This heavily depends on fast quaternion multiplication, I think it >>> will likely come out somewhat behind in benches. >> >> OK, so it would definitely be nice to know how much behind. I haven't peeked >> into the internals of the Quaternion class, but would this difference be due >> to the current implementation, or rather inherent to the involved operations >> and their efficient vectorization? > Quaternion multiplication is vectorized, and is ~2x faster than it's > scalar equivalent. I dont know how to speed it up, apart from > scheduling instructions by hand. Suggestions most welcome. Multiplying > dual quaternions takes 3 quaternion multiplications and one addition. > > Off the top of my head, Matrix4f multiplication takes 28 SSE > instructions at the minimum. A quaternion multiplication takes 7 and > addition just one. So theoretically, it may be faster, but modern > Intel CPU's can dual issue a mul and an add per clock, so by careful > ordering, it may be possible to do the matrix multiplication in lesser > (~half) cycles. The only real way to know for sure is to bench it. And > I dont have time for it now, but I'd be interested in the benchmarks. > >> >>> >>> b) How does eigen do say, 4D rotations? I thought it did only 2D and >>> 3D rotations. >> >> >> In the Transform class, a higher-dimensional rotation would be the linear >> part set to a square nD orthonormal matrix > But you will have to manage the orthonormal matrix yourselves right? I > mean is there an angle axis or its equivalent for 4D? Any support for > composing 4d rotations in eigen? > >>> I don't know if rigid transformations make sense for 2D. >> >> They do :) , rigid transformations make sense in nD > That's interesting. > >> Sure. The main point is that a specialization for rigid transformations >> could be very useful. The Transform class already takes isometries into >> account up to a certain extent (as a hint when computing the inverse), but >> it would be nice to have a way of creating isometries, and guaranteeing that >> they stay that way. With the current Transform class, you could for example >> compose multiple isometries and because of roundoff errors end up with >> something that is not an isometry, and restoring orthonormality of the >> linear part is not trivial. For 3D isometries, renormalizing a quaternion is >> all you need (or similar for dual quaternions). This is why your >> contribution seems worth exploring :). > > The thing is a Transform object could also contain a scaling/shearing > transformation, which is unacceptable for a rigid transformation. The > transform class is suitable for opengl transform matrices, but not for > rigid objects. > > The biggest advantage, the raison d'etre of this class, is > interpolation of rigid transformations, essential in animations. > > Cheers, > > -- > Rohit Garg > > http://rpg-314.blogspot.com/ > > Senior Undergraduate > Department of Physics > Indian Institute of Technology > Bombay > -- Rohit Garg http://rpg-314.blogspot.com/ Senior Undergraduate Department of Physics Indian Institute of Technology Bombay

**Follow-Ups**:**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Benoit Jacob

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Benoit Jacob

**References**:**[eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Adolfo Rodríguez

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Adolfo Rodríguez

**Re: [eigen] Rigid Transformations in eigen: discussion thread***From:*Rohit Garg

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Tiny matrix in Eigen2** - Next by Date:
**[eigen] compilation failed with devel branch (works fine with 2.0.5)** - Previous by thread:
**Re: [eigen] Rigid Transformations in eigen: discussion thread** - Next by thread:
**Re: [eigen] Rigid Transformations in eigen: discussion thread**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |