question on wedge products and rationals in n-Euclidean space rotation

American Citizen <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
Hello all:

I work with lots of rational points on surfaces (2d and 3d and 
occasionally higher) but I am trying to work out a rational rotator.

Please let me explain.

> dot(a,b)=sum(i=1,#a,a[i]*b[i]);
> wedge(a,b)=(a~*b)-(b~*a);
> mag(a)=rsqrt(dot(a,a));
>
> \\ rotate a --> b --> Rotator in n-space
> mat_rot(a,b)=dot(a,b)-wedge(a,b);
I am trying to rotate a point "pt" by using the two vectors a,b which 
create the wedge product

> na=a/mag(a);
> ab=(a+b)/2;
> ab/=mag(ab);
> AB=mat_rot(na,ab);
> BA=mat_rot(ab,na);
The ab vector is 1/2 the way between the two input vectors, a and b, and 
is needed to do the 1/2 the rotation angle since a reflection is being 
used. For example, if I want to rotate 90 degs, I'd have to put in two 
vectors, say in 3d [1,0,0] and [1,1,0] to indicate 45 degrees rotation 
in the xy plane. But the [1,1,0] vector has to be normalized, or the end 
results don't come out right.

We used the wedge products as kind of a sandwich product, which is 
commonly written a^(-1) * V * a

new_pt = (BA*pt~)~*AB))

The problem is the line "ab/=mag(ab). I found out by playing around that 
the two vectors have to be normalized, ie. a/mag(a) and (ab)/mag(ab) for 
the wedge product to work correctly. But that line introduces square 
roots and so the result comes out in real decimals, not as rationals or 
integers.

It should be possible to have a rotation keep points rational if all 
elements of the rotation matrix are rational. But can this be done for 
the wedge product method here? I am using bestappr(final_result) to 
recover the rationals, but sometimes bestappr returns a huge fraction 
with n digits where n is the current operating precision (+/- a few 
digits) and that's a pretty good sign that the value is best left as a 
real number.

But my goal is to input rational vectors, obtain a rational rotator and 
get rational points on the output.

Any ideas?

Randall

P.S. In 2d space, I can spot a rational sine or cosine value pretty 
quickly by using contfrac on the sine(angle) or cosine(angle) in radians 
and adjust that to give a rational rotated point.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.