[Kstars-devel] Testing the use of quaternions in KStars
Jason Harris
jharris at 30doradus.org
Mon Oct 2 16:03:42 CEST 2006
Hi Luciano,
Thanks for your thoughts.
On Monday 02 October 2006 06:10, Luciano Montanaro wrote:
> (basically, you can represent a point (x,y,z) in the cartesian space as
> (x,y,z,1) in the homogeneous space, and represent an infinitely distant
> point in the (x,y,z) direction as (x,y,z,0)).
>
As far as I understand it, you are describing a quaternion :)
> I have written some more thought in the other answer, however here is the
> problem I see with this:
>
> You should not do this kind of conversion one point at a time. the function
> call overhead will kill anything you may win by using simpler arithmetic.
>
I'm not doing the conversion in the loop; quat() simply returns the
already-calculated quaternion for the object.
> Try to fill a Quaternion vector with the star coordinates first, and
> looping on that.
> What does rotateAroundAxis() do?
>
It does the matrix multiplication of oq and m_rotAxis (and modifies oq to be
the result).
> Actually, you just have to setup the 4x4 transformation matrix once to
> setup the rotation, then you just have to multiply the vector and the
> matrix. If this is what the function does, you want it to be inline.
>
>
> Luciano
--
Jason Harris
jharris at 30doradus.org
More information about the Kstars-devel
mailing list