[Fluxus] Rotation Matrix issue

Scott alcoholiday at gmail.com
Fri Mar 20 13:48:42 PDT 2009


Well - since you asked (but this is truly a nit, since it's consistent)

The matrix derived from Quaternion rotation is backwards with respect
to ones computed by the rotate(). One reason could be that the Matrix
constructor that takes 16 values looks like it's col-major order. I
think this is just in the quat-to-matrix code.

But here's the test:

(pmat (qtomatrix (qaxisangle (v3 0 1 0) 45)))
  0.707   0.000   0.707   0.000
  0.000   1.000   0.000   0.000
 -0.707   0.000   0.707   0.000
  0.000   0.000   0.000   1.000
> (pmat (mrotate 0 45 0))
  0.707   0.000  -0.707   0.000
  0.000   1.000   0.000   0.000
  0.707   0.000   0.707   0.000
  0.000   0.000   0.000   1.000
> (pmat (qtomatrix (qaxisangle (v3 1 0 0) 45)))
  1.000   0.000   0.000   0.000
  0.000   0.707  -0.707   0.000
  0.000   0.707   0.707   0.000
  0.000   0.000   0.000   1.000
> (pmat (mrotate 45 0 0))
  1.000   0.000   0.000   0.000
  0.000   0.707   0.707   0.000
  0.000  -0.707   0.707   0.000
  0.000   0.000   0.000   1.000
> (pmat (qtomatrix (qaxisangle (v3 0 0 1) 45)))
  0.707  -0.707   0.000   0.000
  0.707   0.707   0.000   0.000
  0.000   0.000   1.000   0.000
  0.000   0.000   0.000   1.000
> (pmat (mrotate 0 0 45))
  0.707   0.707   0.000   0.000
 -0.707   0.707   0.000   0.000
  0.000   0.000   1.000   0.000
  0.000   0.000   0.000   1.000
>

On Fri, Mar 20, 2009 at 1:57 AM, Dave Griffiths <dave at pawfal.org> wrote:
> On Fri, 2009-03-20 at 08:48 +0000, Dave Griffiths wrote:
>> On Fri, 2009-03-20 at 09:37 +0100, gabor papp wrote:
>> > > It looks like the rotation matrix math in dada.h is inconsistent; and
>> > > the signs on the sins need to be flipped for the y-axis.
>> > this seems to be right. nice catch. could you submit this as a bug please?
>>
>> A great bit of detective work - thanks Scott.
>>
>> > > I'm gonna make the change locally. This is an interesting one, since
>> > > people probably depend on the existing behavior -
>> > i don't think this is a problem. this is the case with the planes and
>> > the flipped texture bugs also.
>>
>> Yes. I think we need to set aside a week to fix all these things -
>> probably just before we do a release, so we can all update our scripts
>> in one go.
>>
>
> Shall I release 0.16 quite soon, end of next week-ish? Then we can get
> all these niggly things fixed over the next few days, do a release and
> then get the frame buffer pixels branch merged in afterwards for 0.17...
>
> So that means all we should commit is:
>
> * Plane orientation fixes
> * Rotation fix
> * Flipped texture coords fix
>
> Anything else?
>
> cheers,
>
> dave
>
>



More information about the Fluxus mailing list