Virtual Sky - (Speedy) Gonzales Update

After adding a gnomic-tan projection to Virtual Sky I noticed that it was starting to get quite slow to draw the sky. Checking back through the code I realised that I was converting between degrees and radians quite a lot. Although that conversion is a simple multiplication, when you're doing it many tens of thousands of times it adds up to a noticeable delay. I've been through all the code and made sure that as much as possible of the internal code is dealing in radians. I also realised that I was being less than efficient at drawing the constellation boundaries (I was drawing each shared boundary line twice) so I've built some caching into that function. These changes, along with a bit more re-factoring has sped up the processing time and everything is much faster when dragging the sky.

Other changes

  • I've recently discovered HTML5's createRadialGradient() so the polar-style projections will now benefit from a sky gradient like many of the other projections.
  • I've rebuilt the faint star catalogue to include more stars. That increases the size of the star file from 23kB to 54kB. That adds a bit to the bandwidth but you do get more stars.
  • I fixed a bug that meant some objects (e.g. part of the Ecliptic and sometimes the Sun) weren't displayed in the equi-rectangular projection.
  • I fixed a bug that meant the Cardinal points didn't inherit the font properties.
  • After a suggestion from kcgolden on Github I've implemented an animated pan for the gnomic-tan projection to move to a specified RA/Dec. If you know how to use your browser's Javascript console you can test it out by going to VirtualSky with a gnomic projection then running the command:

I've updated the LCOGT embed version so, if you are using that, you already have the improvements.

Posted in astro blog by Stuart on Thursday 14th Nov 2013 (02:34 GMT) | 1 Comment | Permalink
Comments are no longer included on this blog as increasing numbers of people couldn't follow the ground rules and be civil.