title: Plotting a star chart efficiently
body: <p>I'd like to visualize astronomical  star catalogues that can contain hundreds of thousands of entries. The catalogues usually consist of simply a list of stars, with spherical coordinates and other data for each star. By spherical coordinates I mean right ascension (0-360 degrees or 0-24 hours) and declination (-90 degrees to +90 degrees). This corresponds to longitude and latitude, just on the celestial sphere instead of Earth's surface.</p>
  
  <p>I'd like to plot all the stars in the catalogue that are located inside a certain field of view, defined by the center (in spherical coordinates) and the size of the field of view (in degrees) and the projection (e.g. stereographic projection).</p>
  
  <p>Plotting the stars by going through the whole catalogue and just checking whether each star is inside the field of view or not is very inefficient.</p>
  
  <p><strong>How could I make this more efficient? Is there a good algorithm or data structure for this kind of a problem?</strong></p>