[Kstars-devel] Fwd: Plans for threading in KStars

Alexey Khudyakov alexey.skladnoy at gmail.com
Wed Nov 9 20:08:04 UTC 2011


On 09.11.2011 21:18, Daniel-Marian Baboiu wrote:
> On Wed, 2011-11-09 at 06:59 +0300, Aleksey Khudyakov wrote:
>
>> I think there is no need to work with Cartesian coordinates except when
>> doing projections. Point on sphere could be represented as rotation which
>> moves "north pole" (0,0,1) to the desired point on sphere.
>
> A rotation from north pole to desired point on sphere (using  quaternions
> or something else) still involves calculating sincos for both latitude and
> longitude (the quaternion requires sin and cos of half-angle of
> rotation).

This is the case if location on sphere is stored as θ,φ pair. Then 
translation to quaternion form involve trigonometry. But if point 
position is stored as quaternion there is no trygonometry involved
in sphere rotations.

There are no free cake and this representation eats 2x more memory 
(maybe it could be reduced to 1.5x). Also ra() & dec() accessors
becomes expensive and involve trigonometry. They shouldn't appear in 
tight loops so its OK.


More information about the Kstars-devel mailing list