Re: Deconstructing affine transformations into rotation, scale, skew
  Home FAQ Contact Sign in
sci.math only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Deconstructing affine transformations into rotation, scale, skew         

Group: sci.math · Group Profile
Author: Spud Demon
Date: Jul 15, 2008 17:42

Ray Koopman writes in article e39g2000hsf.googlegroups.com> dated Mon, 14 Jul 2008 00:23:56 -0700 (PDT):
>theta = (1/2) arctan( 2r / (p - q) ), where M'M = [p r],
>and the signs of the numerator & denominator [r q]
>determine the quadrant of 2*theta. Take quadrants 3 & 4
>as representing negative angles, so -PI/2 < theta <= PI/2.

That's great. I was going to use a numerical method (Newton's) to find
where the derivative was 0, but closed form is better.
>> The square roots of of f(theta) and f(theta+PI/2) would be the
>> diagonal of D. Then a little matrix inversion to calculate V'.
>
>No, you just solved for V = [ cos(theta) -sin(theta) ]
> [ sin(theta) cos(theta) ].

Of course -- we want the rotational transformation for -theta, not theta.
>To get U, normalize each column of MV = UD; i.e., divide
>by the appropriate d, which is the length of the column.

Since the Java API has an invert method built right in, I used
U = M*invert(D*V')

Thanks again for your help!

--Spud Demon
no comments
diggit! del.icio.us! reddit!