@@ -0,0 +1,1786 @@
+import java.awt.Graphics2D;%0Aimport java.io.File;%0Aimport java.util.Scanner;%0A%0Aimport coordinates.AzimuthalEquidistantProjection;%0A%0Apublic class StarPlotGradient extends JStarPlot%0A%7B%0A%09public StarPlotGradient()%0A%09%7B%0A%09%09super();%0A%09%7D%0A%09%0A%09@Override%0A%09public void drawStar( Star star, AzimuthalEquidistantProjection p )%0A%09%7B%0A%09%09Graphics2D g2 = im.createGraphics();%0A%09%09boolean originAtCenter = false;%0A%09%09double starArea = Math.pow( MAG_UNIT, -1 * star.MAG ) * Math.PI;%0A%09%09double starRadius = RADIUS * Math.sqrt( starArea / Math.PI );%0A%09%09double%5B%5D coordinates = p.getXY( star.RA, star.DEC );%0A%0A%09%09coordinates%5BY%5D *= -1;%0A%09%09if ( !originAtCenter )%0A%09%09%7B%0A%09%09%09coordinates%5BX%5D += 1;%0A%09%09%09coordinates%5BY%5D += 1;%0A%09%09%7D%0A%09%09coordinates%5BX%5D *= SCALE;%0A%09%09coordinates%5BY%5D *= SCALE;%0A%0A%09%09coordinates%5BX%5D -= SCALE - WIDTH/2;%0A%09%09coordinates%5BY%5D -= SCALE - HEIGHT/2;%0A%09%09%0A%09%09if ( 0 %3E coordinates%5BX%5D %7C%7C coordinates%5BX%5D %3E WIDTH %7C%7C%0A%09%09%09 0 %3E coordinates%5BY%5D %7C%7C coordinates%5BY%5D %3E HEIGHT )%0A%09%09%09return;%0A%09%09Star2D dStar = new Star2D( coordinates%5BX%5D, coordinates%5BY%5D, %0A%09%09                           starRadius, star.SPECTRAL_TYPE );%0A%09%09dStar.drawGradient( g2 );%0A%09%09g2.dispose();%0A%09%7D%0A%0A%09public static void main( String... args ) throws Throwable%0A%09%7B%0A%09%09StarPlotGradient im = new StarPlotGradient();%0A%09%09im.openNewDisplayWindow();%0A%0A%09%09AzimuthalEquidistantProjection p;%0A%09%09//Scanner in = new Scanner( new File( %22/home/aaron/workspace/PP4/catalogs/SGRstars.pp4%22 ) );%0A%09%09Scanner in = new Scanner( new File( %22/home/aaron/workspace/PP4/catalogs/hipparcos-tycho2.pp4%22 ) );%0A%09%09p = AzimuthalEquidistantProjection.TAURUS;%0A%09%09im.drawMilkyWay( p );%0A%09%09im.repaintCurrentDisplayWindow();%0A%09%09im.drawHydrogenAlpha( p );%0A%09%09im.repaintCurrentDisplayWindow();%0A%09%09while ( in.hasNext() )%0A%09%09%7B%0A%09%09%09im.drawStar( processStar( in ), p );%0A%09%09%09im.repaintCurrentDisplayWindow();%0A%09%09%7D%0A%09%09System.out.println( %22done%22 );%0A%09%7D%0A%7D%0A

Create StarPlotGradient.java