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) | 1 Comment | Permalink

Comments: Virtual Sky - (Speedy) Gonzales Update

maria t: what even is gnomic tan project?

Posted by Maria on Monday 09th Dec 2013 (02:00 UTC)

ADD A COMMENT:


Don't provide an email/URL unless really necessary as your comment may get caught in the spam filter. No URLs get turned into links so don't bother. The ground rules for commenting are:
  1. No profanity or personal attacks please. Keep it clean.
  2. Restrict comments to subjects relevant to the post.
  3. Don't mention Pluto. If you do it'll be replaced by Goofy.
  4. No spam i.e. anything commercial unrelated to astronomy.
  5. If you think you've discovered a Theory of Everything, a replacement to Relativity, or something similar then please publish it in a journal rather than in my comments.
Comments against the spirit of these ground rules may be removed.











* required fields