[Kstars-devel] Kstars-devel Digest, Vol 143, Issue 3

Daniel Baboiu daniel.baboiu at shaw.ca
Mon Jul 27 01:29:55 UTC 2015


I think that the error is from trying to draw a "flat" image onto a
sphere. One of the most obnoxious problems of mapping a 2D image onto a
sphere is that a "straight line" as seen on the sky translates into a
curve when doing a projection of the sky sphere to a flat surface. The
artwork would have to be subjected to a more complicated transform than
can be described by only 4 points. That is, unless the constellation is
relatively small and is drawn only perpendicular to the constellation
area on the sky. 

I think that the proper approach would be along the same algorithm used
to draw the boundaries of the Milky Way. 

Another approach (simpler, for a programmer) would be to draw the
artwork on a cylindrical projection of the sky, and then let OpenGL do
the heavy lifting of warping the images to be properly drawn on the sky
map. Stellarium might use this approach. I don't know what is the status
of OpenGL support in KStars, so I can't tell which approach to use.

Daniel


On Thu, 2015-07-23 at 12:21 +0530, M.S. Adityan wrote:
> Hi Alexander,
> 
> 
> Yes, what you pointed out definitely needs to be corrected. Also, the
> constellation image moves when you pan the sky. I am not sure on an
> exact mathematical solution to the problem. So what I have done is
> that I looked up the coordinates for the midpoint of the image from
> Stellarium, and adjusted the size of the image and position angle in
> order to best fit the constellation lines. Now as it turns out, these
> values are not the same for all projection systems. 
> 
> I have tried to implement a completely new method, that fixes the 4
> corners of the rectangle in the sky, but it draws the image in a very
> weird manner. The image is stretched and drawn outside the sphere. I
> have tried to do this on Ursa Major. Could you perhaps suggest some
> ideas to solve this problem or maybe some ideas to modify the old code
> itself?
> 
> 
> Thanks.
> 
> 
> 
> 
> M.S.Adityan
> Website: www.msadityan.com
> https://www.linkedin.com/in/msadityan
> 





More information about the Kstars-devel mailing list