-
- xglColor3f(magnitude, magnitude, magnitude);
- /* xglColor3f(1.0, 1.0,1.0); */
-
- xglVertex3f( 50000.0 * cos(pltPos.RightAscension) *
- cos(pltPos.Declination),
- 50000.0 * sin(pltPos.RightAscension) *
- cos(pltPos.Declination),
- 50000.0 * sin(pltPos.Declination) );
+ /* Add planets to the display list, based on sun_angle and current
+ magnitude It's pretty experimental... */
+
+ if ((double) (l->sun_angle - FG_PI_2) >
+ ((magnitude - 1.0) * -20 * DEG_TO_RAD))
+ {
+ xglColor3f (magnitude, magnitude, magnitude);
+ printf ("Sun Angle to Horizon (in Rads) = %f\n",
+ (double) (l->sun_angle - FG_PI_2));
+ printf ("Transformed Magnitude is :%f %f\n",
+ magnitude, (magnitude - 1.0) * -20 * DEG_TO_RAD);
+
+ xglVertex3f (50000.0 * cos (pltPos.RightAscension) *
+ cos (pltPos.Declination),
+ 50000.0 * sin (pltPos.RightAscension) *
+ cos (pltPos.Declination),
+ 50000.0 * sin (pltPos.Declination));
+ }