[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kstars-devel
Subject:    [Kstars-devel]
From:       Akarsh Simha <akarshsimha () gmail ! com>
Date:       2008-06-29 22:16:36
Message-ID: 1214777796.714447.23867.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 826149 by asimha:

Incorporating James' improvements for the star size formula.

It looks much better now. I liked the constant at 5.8 instead of 6.0,
so I kept it at that. I also found the name sizeMagLim more meaningful
than fake_maglim which I cooked up in a hurry.

Thanks James!

CCMAIL: kstars-devel@kde.org



 M  +6 -4      starcomponent.cpp  


--- branches/kstars/summer/kdeedu/kstars/kstars/skycomponents/starcomponent.cpp \
#826148:826149 @@ -259,7 +259,9 @@
     visibleStarCount = 0;
 
     t.start();
-    float fake_maglim = ( ( maglim > m_FaintMagnitude * (1 - 1.5/16) ) ? \
m_FaintMagnitude * ( 1 - 1.5/16 ) : maglim ); +    float sizeMagLim = ( 2.000 + 2.444 \
* Options::memUsage() / 10.0 ) * ( lgz - lgmin ) + 5.8; +    if( sizeMagLim > \
m_FaintMagnitude * ( 1 - 1.5/16 ) ) +        sizeMagLim = m_FaintMagnitude * ( 1 - \
1.5/16 );  
     if( veryFrugalMem )
         m_StarBlockFactory.freeAll();
@@ -313,8 +315,8 @@
             QPointF o = map->toScreen( curStar );
             
             if ( ! map->onScreen( o ) ) continue;
-            float size = ( sizeFactor*( fake_maglim - mag ) / fake_maglim ) + 1.;
-            if ( size <= 0. ) continue;
+            float size = ( sizeFactor*( sizeMagLim - mag ) / sizeMagLim ) + 1.;
+            if ( size <= 1.0 ) size = 1.0;
 
             curStar->draw( psky, o.x(), o.y(), size, (starColorMode()==0),
                            starColorIntensity(), true );
@@ -365,7 +367,7 @@
                 QPointF o = map->toScreen( curStar );
 
                 if ( ! map->onScreen( o ) ) continue;
-                float size = ( sizeFactor*( fake_maglim - mag ) / fake_maglim ) + \
1.; +                float size = ( sizeFactor*( sizeMagLim - mag ) / sizeMagLim ) + \
1.;  if ( size <= 0. ) continue;
                 curStar->draw( psky, o.x(), o.y(), size, (starColorMode()==0),
                                starColorIntensity(), true );
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic