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:
    planetarium.panTo(83.8220833,-5.3911111,2000);

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

Tags:
Posted in astro blog by Stuart on Thursday 14th Nov 2013 (02:34 GMT) | Permalink

Virtual Sky - Gnomic Update

Recently I've been thinking it'd be good if VirtualSky was able to show a view centred on a specific position in the sky. In my sandbox version I've added a gnomic tan projection that will do exactly that. This could be useful for displaying constellations or perhaps basic finder charts. If you use it you'll probably also want to turn the ground off with "ground=false".

A second addition I made was to use the URL to display markers for specific objects. This uses LookUP to resolve the positions. You just need to add an argument along the lines of "objects=M1;M42;Horsehead+Nebula" (use semi-colons to separate names).

These changes only work in my sandbox version at the moment whilst I test them.

Update 08th Nov 2013 09:24 GMT: I've also improved the speed of rendering and included these changes on the live embed version.

Posted in astro blog by Stuart on Wednesday 06th Nov 2013 (23:23 GMT) | Permalink
[an error occurred while processing this directive]