|Re: [eigen] get scaling out of transform?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] get scaling out of transform?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 22 Jan 2009 00:40:42 +0100
- 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 :content-transfer-encoding; bh=cLU315sXsu6MLNqBU2sBWQbOAwoj/9csdcQqO5gxdvw=; b=clj7STXJjM+AocFIM2/27fG19lsM32NomZi++PXGwVeM/CQGi/RGMXEmPbJ6EZH10o v6ClEjSDVpC2z5rvokpdRff9tzctYc1NORIAQtkzko283Oz60YZkzSVMQNhgqQXIqTLi ywUsGDeF45CLzq4+MKM4heQt0joSeaKofiUnI=
- 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:content-transfer-encoding; b=cCuFWQX1ysjsanCztPUOzSw5b/PjhkZDhaQpj3HMzwvWlzWMg4DmUxy2sYmrKGl+5u M5qYKATn52VVEDwk9/GO9LUw0fI9GwEZgCSRV9uQC23LjkYJegqwPkj9WL+jDJhssAIU rFxwfmmBjdX38//EgoOXACeSV6JRslUcxxfm4=
This is currently unimplemented in Transform, and the computation
involved is really nontrivial.
It is definitely on my TODO for 2.1.
Here's an explanation. When you decompose a matrix as a product
rotation*scaling, that's called the "polar decomposition". Computing
the polar decomposition amounts to computing the SVD decomposition. In
Eigen 2.1 we'll have a very good SVD with fixed-size specializations
and I'll use that to implement scaling() and reimplement rotation()
correctly in Transform.
Meanwhile, if you don't care about performance, you can already use
the SVD in Eigen 2.0 but it's slow if only for lack of fixed-size
If the SVD of M is M = U D V^ (where ^ denotes adjoint, or
transpose for real matrices)
then you have M = U D U^ U V^
So your scaling is U D U^
and your rotation is U V^
2009/1/21 Ben Axelrod <baxelrod@xxxxxxxxxxxx>:
> How can I get the scaling info out of the Transform class?