One change that helps the situation is to add a
GL_POSITION of 0 0 0 1 to the verb solarlight as shown
below. But the sun looks unbright as if the source of light
inside of it is not shown on its own surface. So I increased
GL_AMBIENT to 0.5 0.5 0.5 and got a slightly improved
system. This revision of GL_AMBIENT does not make much sense
to me (it is a trial and error result). Can others figure it
out?

solarlight=: 3 : 0
glaLight GL_LIGHT0, GL_AMBIENT, 0.15 0.15 0.15 1
glaLight GL_LIGHT0, GL_DIFFUSE, 0.7 0.7 0.7 1
glaLight GL_LIGHT0, GL_SPECULAR, 0.3 0.3 0.3 1
glaLight GL_LIGHT0, GL_POSITION, 0 0 0 1

glaLight GL_LIGHT0, GL_AMBIENT, 0.5 0.5 0.5


On Wed, 27 Sep 2006, Brian Schott wrote:

+       Visually it appears that the lighting in the solar
+ demo is off because for example the blue planet (Earth?) is
+ always lit on the face closest to the viewer, not the face
+ lit by the sun. Am I correct and how can the simulation be
+ corrected for this? (Btw, I was able to slow down the
+ simulation enough to make this observation by changing
+ RUNDELAY to 10.) I assume that the sun must be a light
+ source, but I cannot find an example which makes one object
+ a light source, and not another.
+
+ (B=)
+ ----------------------------------------------------------------------
+ For information about J forums see http://www.jsoftware.com/forums.htm
+

(B=) <----------my "sig"

Brian Schott
Atlanta, GA, USA
schott DOT bee are eye eh en AT gee em ae eye el DOT com
http://schott.selfip.net/~brian/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to