[Kstars-devel] branches/work/kdeedu_kstars_htm/kstars/kstars

James Bowlin bowlin at mindspring.com
Sun Aug 5 00:08:58 CEST 2007


SVN commit 696460 by jbowlin:

Streamedlined the re-indexing code a little.  I think I should be
passing around a KStarsDateTime and not a KSNumbers but we can fix
that later if need be.  

If we re-index (due to a large time jump) and then read in more faint
stars, I'm now indexing the new stars to the same time that the other
stars were already re-indexed to.

I'm doing the re-indexing from inside SkyMapComponent::draw().  I
delay the re-indexing one draw cycle which allows us to present a
pretty face to the user (a skymap of the new time perhaps minus a few
fast moving stars) while we re-index.  Something else is gobbling up a
bunch of time before all this happens, my guess is maybe it is the JIT
and non-JIT updates that are triggered by the large time jump.

I'm now using SkyPoint::ra0(), and dec0, instead of SkyPoint::ra() for
doing the indexing inside of SkyMesh.  This means indexed objects are
all indexed in their exact J2000 positions.

Created a NoPrecessIndex subclass of LineListIndex.  It is subclassed
in turn by CoordinateGrid and ConsellationBoundaries.  This appears to
be working and I don't see any voids in the coordinate grid or the
constellation boundaries when we jump ahead a few millennia.

Unfortunately, this requires doing the equivalent of a 2nd
SkyMesh::aperture() call at the start of every draw cycle in order to
provide a list of the non-precessed trixels that cover the screen.  I
only do this when the coordinate grid or the constellation boundaries
need to be displayed but the slowdown is noticeable.  I think I'm
going to try a hybrid solution that bypasses the index for the
non-precessed guides when the screen is mostly zoomed out.  We only
gain at most a factor of two in speed when the screen is zoomed out
and I think that the cost to create the non-precessed aperture fair
outweighs the savings in this case.  But when the screen is zoomed in,
creating the 2nd aperture is fast and the savings from using it are
large so in that case I will bother to create the 2nd aperture and use
it for drawing the non-precessed guides like I'm doing right now.

I'm still planning to always use the reverse precessed aperture for
the stars and everything else so I will use the count of the number of
trixels in that aperture to decide whether we create the 2nd
non-precessed aperture or just draw all the elements of coordinate
grid and constellation boundaries.

If this hybrid plan works, we might be able to use it to for indexing
the remaining three guides: horizon, celestial equator, and the
ecliptic.  Since these guides each only contain 360 points (I think) I
thought using the index might be slower than just going through the
entire lists of points.  But the hybrid solution gives us the best of
both worlds.

In addition to the hybrid drawing, I still need to re-index the
constellation lines.  Jason offered some clever ideas on how to
greatly speed up the re-indexing so I might explore that after the
hybrid drawing and constellation lines re-indexing.

It is possible that it would have been faster to just keep re-indexing
things that precess as they precess so we would only have to have just
one aperture.  But it is also possible that it would be slower.  I
think we should get the first version of indexing out the door before
we start exploring such alternatives.  If it turns out to be better
then it gives us something nice to offer in 4.2 or 4.3.

CCMAIL: kstars-devel at kde.org



 M  +1 -0      CMakeLists.txt  
 M  +1 -11     skycomponents/constellationboundary.cpp  
 M  +2 -4      skycomponents/constellationboundary.h  
 M  +10 -2     skycomponents/constellationlines.cpp  
 M  +5 -0      skycomponents/constellationlines.h  
 M  +1 -12     skycomponents/coordinategrid.cpp  
 M  +2 -4      skycomponents/coordinategrid.h  
 M  +24 -6     skycomponents/linelistindex.cpp  
 M  +7 -3      skycomponents/linelistindex.h  
 A             skycomponents/noprecessindex.cpp   [License: GPL (v2+)]
 A             skycomponents/noprecessindex.h   [License: GPL (v2+)]
 M  +7 -6      skycomponents/skymapcomposite.cpp  
 M  +3 -0      skycomponents/skymapcomposite.h  
 M  +37 -56    skycomponents/skymesh.cpp  
 M  +12 -4     skycomponents/skymesh.h  
 M  +20 -16    skycomponents/starcomponent.cpp  
 M  +3 -2      skycomponents/starcomponent.h  




More information about the Kstars-devel mailing list