[Bf-python] quat multiplication
models at paposo.com
models at paposo.com
Fri Nov 28 03:02:16 CET 2003
They look that way but check this out. I put the formulas into an excel
spreadsheet. I think that blender's coordinates are rotated or something:
----- Original Message -----
From: "Willian Padovani Germano" <wgermano at ig.com.br>
To: <bf-python at blender.org>
Sent: Thursday, November 27, 2003 7:00 PM
Subject: Re: [Bf-python] quat multiplication
> Hi,
>
> > t0= q1[0]*q2[0]-q1[1]*q2[1]-q1[2]*q2[2]-q1[3]*q2[3];
> > t1= q1[0]*q2[1]+q1[1]*q2[0]+q1[2]*q2[3]-q1[3]*q2[2];
> > t2= q1[0]*q2[2]+q1[2]*q2[0]+q1[3]*q2[1]-q1[1]*q2[3];
> > q[3]= q1[0]*q2[3]+q1[3]*q2[0]+q1[1]*q2[2]-q1[2]*q2[1];
> > q[0]=t0;
> > q[1]=t1;
> > q[2]=t2;
>
> > x = qw * q.x + qx * q.w + qy * q.z - qz * q.y;
> > y = qw * q.y - qx * q.z + qy * q.w + qz * q.x;
> > z = qw * q.z + qx * q.y - qy * q.x + qz * q.w;
> > w = qw * q.w - qx * q.x - qy * q.y - qz * q.z;
>
> > when you multiply the quats, blender gives:
> > q3 = [-4,4,4,4] (w,z,y,x)
> > and cal3d gives:
> > q3 = [4,4,4,-4] (x,y,z,w)
>
> No, look again at the two sets of multiplications, comparing for example
> t1 in the first with x in the second. Blender stores quats as
> (w,x,y,z) -- the real part is at index 0, that's the only difference.
>
> --
> Willian, wgermano at ig.com.br
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qMult.xls
Type: application/vnd.ms-excel
Size: 14848 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20031127/11341c2f/attachment.xls>
More information about the Bf-python
mailing list