Re: 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]> |
To all: I finally got the AB * v * BA wedge products to work properly for rotations in n-Euclidean space, by only after I multiplied M = AB*B*A and noticed that all non-diagonal entries = 0 and that the diagonal was a scaling factor for each point being rotated. I cannot recall anything on the internet about AB*BA to recover the scaling factors for the rotated point, it was a welcome find for me. Randall On 7/20/25 01:31, Bill Allombert wrote: > On Sat, Jul 19, 2025 at 09:12:51PM -0700, American Citizen wrote: >> 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]); > dot(a,b) = a*b~ > >>> 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. > mat_rot is homogenous of degree 1 with respect to each of the variable so > mat_rot(a/mag(a),b/mag(b))= mat_rot(a,b)/(mag(a)*mag(b)) > = mat_rot(a,b)/rsqrt(dot(a,a)*dot(b,b)) > > So if dot(a,a)*dot(b,b) is a square, you can stay with rational numbers. > > Cheers, > Bill. >