[Kstars-devel] branches/kstars/unfrozen/kstars/kstars/skycomponents

Jason Harris kstars at 30doradus.org
Wed Jun 25 08:37:01 CEST 2008


SVN commit 824172 by harris:

committing patch from James for better progression of
star sizes as a function of magnitude.

CCMAIL: kstars-devel at kde.org




 M  +6 -5      starcomponent.cpp  


--- branches/kstars/unfrozen/kstars/kstars/skycomponents/starcomponent.cpp #824171:824172
@@ -216,12 +216,13 @@
     double lgmax = log10(MAXZOOM);
     double lgz = log10(Options::zoomFactor());
 
-    
-    float maglim = 3.5 * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
+    double magFactor = 4.444; 
+    double maglim = magFactor * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
+    double sizeMagLim = magFactor * ( lgz - lgmin ) + 6.0;
 
     m_zoomMagLimit = maglim;
 
-    float sizeFactor = 10.0 + (lgz - lgmin);
+    double maxSize = 10.0;
 
     double labelMagLim = Options::starLabelDensity() / 5.0;
     labelMagLim += ( 12.0 - labelMagLim ) * ( lgz - lgmin) / (lgmax - lgmin );
@@ -264,8 +265,8 @@
             QPointF o = map->toScreen( curStar );
 
             if ( ! map->onScreen( o ) ) continue;
-            float size = ( sizeFactor*( maglim - mag ) / maglim ) + 1.;
-            if ( size <= 0. ) continue;
+            float size = maxSize * ( sizeMagLim - mag ) / sizeMagLim;
+            if ( size < 1.0 ) size = 1.0;
 
             curStar->draw( psky, o.x(), o.y(), size, (starColorMode()==0),
                            starColorIntensity(), true );


More information about the Kstars-devel mailing list