Index: celengine/render.cpp =================================================================== --- celengine/render.cpp (revision 4353) +++ celengine/render.cpp (working copy) @@ -228,6 +228,7 @@ Color Renderer::GalacticGridColor (0.38f, 0.38f, 0.28f); Color Renderer::EclipticGridColor (0.38f, 0.28f, 0.38f); Color Renderer::HorizonGridColor (0.38f, 0.38f, 0.38f); +Color Renderer::EclipticColor (0.5f, 0.1f, 0.1f); // Some useful unit conversions @@ -3327,9 +3328,7 @@ glEnable(GL_TEXTURE_2D); // Render sky grids first--these will always be in the background - if (renderFlags & (ShowCelestialSphere | ShowGalacticGrid | ShowEclipticGrid | ShowHorizonGrid)) { - glColor(EquatorialGridColor); glDisable(GL_TEXTURE_2D); if ((renderFlags & ShowSmoothLines) != 0) enableSmoothLines(); @@ -10092,6 +10091,21 @@ } } } + + if (renderFlags & ShowEcliptic) + { + // Draw the J2000.0 ecliptic; trivial, since this forms the basis for + // Celestia's coordinate system. + const int subdivision = 200; + glColor(EclipticColor); + glBegin(GL_LINE_LOOP); + for (int i = 0; i < subdivision; i++) + { + double theta = (double) i / (double) subdivision * 2 * PI; + glVertex3f((float) cos(theta) * 1000.0f, 0.0f, (float) sin(theta) * 1000.0f); + } + glEnd(); + } } Index: celengine/render.h =================================================================== --- celengine/render.h (revision 4353) +++ celengine/render.h (working copy) @@ -157,6 +157,7 @@ ShowGalacticGrid = 0x400000, ShowEclipticGrid = 0x800000, ShowHorizonGrid = 0x1000000, + ShowEcliptic = 0x2000000, }; enum StarStyle @@ -811,6 +812,7 @@ static Color GalacticGridColor; static Color EclipticGridColor; static Color HorizonGridColor; + static Color EclipticColor; }; Index: celestia/celx.cpp =================================================================== --- celestia/celx.cpp (revision 4351) +++ celestia/celx.cpp (working copy) @@ -125,6 +125,7 @@ RenderFlagMap["nebulae"] = Renderer::ShowNebulae; RenderFlagMap["openclusters"] = Renderer::ShowOpenClusters; RenderFlagMap["cloudshadows"] = Renderer::ShowCloudShadows; + RenderFlagMap["ecliptic"] = Renderer::ShowEcliptic; } void CelxLua::initLabelFlagMap() @@ -243,7 +244,8 @@ LineColorMap["eclipticgrid"] = &Renderer::EclipticGridColor; LineColorMap["horizontalgrid"] = &Renderer::HorizonGridColor; LineColorMap["planetographicgrid"] = &Renderer::PlanetographicGridColor; - LineColorMap["planetequator"] = &Renderer::PlanetEquatorColor; + LineColorMap["planetequator"] = &Renderer::PlanetEquatorColor; + LineColorMap["ecliptic"] = &Renderer::EclipticColor; }