POV-Ray : Newsgroups : povray.general : Newbie question about the light_source function. : Newbie question about the light_source function. Server Time
29 Jul 2024 00:37:24 EDT (-0400)
  Newbie question about the light_source function.  
From: Marie
Date: 6 Nov 2003 20:39:07
Message: <omlmqvk93bqkfmkrvg6umk9mhu3k1rm7iq@4ax.com>
To all the POVRay gurus,

I am a newbie, and I have found something that puzzles me.

Please look at the following POV-file:

- - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - -
- >8 - - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - - - >8 -
- - - - - - - - - >8

#include "colors.inc"
#include "stones.inc"    


camera {
    location <0, 9, -3>
    look_at  <0, -9,  1>
  }
                                           
light_source { <2.5, 45, 600> color Green}
light_source { <2.5, 39, 600> color Green}
light_source { <2.5, 35, 600> color Green}
light_source { <2.5, 31, 600> color Green}
light_source { <1.5, 21, 600> color Green}
light_source { <2.5, 11, 600> color Green}
light_source { <1.5, 1, 600> color Green}
light_source { <2.5, -11, 600> color Green}
light_source { <1.5, -21, 600> color Green}     
light_source { <2.5, -31, 600> color Green}
light_source { <1.5, -41, 600> color Green}
light_source { <2.5, -51, 600> color Green}
light_source { <1.5, -61, 600> color Green}
light_source { <2.5, -70, 600> color Green}
light_source { <2.5, -75, 600> color Green}
light_source { <2.5, -80, 600> color Green}
light_source { <2.5, -85, 600> color Green}                                           
light_source { <2.5, 39, 400> color Yellow}
light_source { <2.5, 35, 400> color Yellow}
light_source { <2.5, 31, 400> color Yellow}
light_source { <1.5, 21, 400> color Yellow}
light_source { <2.5, 11, 400> color Yellow}
light_source { <1.5, 1, 400> color Yellow}
light_source { <2.5, -11, 400> color Yellow}
light_source { <1.5, -21, 400> color Yellow}     
light_source { <2.5, -31, 400> color Yellow}
light_source { <1.5, -41, 400> color Yellow}
light_source { <2.5, -51, 400> color Yellow}
light_source { <1.5, -61, 400> color Yellow}
light_source { <2.5, -70, 400> color Yellow}
light_source { <2.5, -75, 400> color Yellow}
light_source { <2.5, -80, 400> color Yellow}   
light_source { <2.5, 35, 250> color Red}
light_source { <2.5, 31, 250> color Red}
light_source { <1.5, 21, 250> color Red}
light_source { <2.5, 11, 250> color Red}
light_source { <1.5, 1, 250> color Red}
light_source { <2.5, -11, 250> color Red}
light_source { <1.5, -21, 250> color Red}     
light_source { <2.5, -31, 250> color Red}
light_source { <1.5, -41, 250> color Red}
light_source { <2.5, -51, 250> color Red}
light_source { <1.5, -61, 250> color Red}
light_source { <2.5, -70, 250> color Red}
light_source { <2.5, -75, 250> color Red}
light_source { <2.5, 31, 100> color Red}
light_source { <2.5, 29, 100> color Red}
light_source { <2.5, 27, 100> color Red}
light_source { <1.5, 25, 100> color Red}
light_source { <2.5, 23, 100> color Red}     
light_source { <1.5, 21, 100> color Red}
light_source { <2.5, 19, 100> color Red}
light_source { <2.5, 17, 100> color Red}
light_source { <1.5, 15, 100> color Red}     
light_source { <2.5, 13, 100> color Red}
light_source { <2.5, 11, 100> color Red}
light_source { <2.5, 9, 100> color Red}
light_source { <2.5, 7, 100> color Red}
light_source { <1.5, 5, 100> color Red}
light_source { <2.5, 3, 100> color Red}     
light_source { <1.5, 1, 100> color Red}
light_source { <1.5, -1, 100> color Red}
light_source { <1.5, -3, 100> color Red}
light_source { <1.5, -5, 100> color Red}
light_source { <1.5, -7, 100> color Red}
light_source { <1.5, -9, 100> color Red}
light_source { <1.5, -11, 100> color Red}
light_source { <1.5, -13, 100> color Red}
light_source { <1.5, -15, 100> color Red}
light_source { <1.5, -17, 100> color Red}  
light_source { <1.5, -19, 100> color Red}
light_source { <1.5, -21, 100> color Red}     
light_source { <2.5, -23, 100> color Red}
light_source { <1.5, -25, 100> color Red}
light_source { <1.5, -27, 100> color Red}     
light_source { <1.5, -29, 100> color Red}     
light_source { <2.5, -31, 100> color Red}
light_source { <1.5, -33, 100> color Red}
light_source { <1.5, -35, 100> color Red}
light_source { <1.5, -37, 100> color Red}
light_source { <1.5, -39, 100> color Red}
light_source { <1.5, -41, 100> color Red}
light_source { <1.5, -43, 100> color Red}
light_source { <1.5, -45, 100> color Red}
light_source { <1.5, -47, 100> color Red}
light_source { <1.5, -49, 100> color Red}
light_source { <2.5, -51, 100> color Red}
light_source { <1.5, -53, 100> color Red}
light_source { <1.5, -55, 100> color Red}
light_source { <1.5, -57, 100> color Red}
light_source { <1.5, -59, 100> color Red}
light_source { <1.5, -61, 100> color Red}
light_source { <1.5, -63, 100> color Red}
light_source { <1.5, -65, 100> color Red}
light_source { <1.5, -67, 100> color Red}
light_source { <1.5, -69, 100> color Red}
light_source { <2.5, -70, 100> color Red}
light_source { <2.5, 31, 80> color Red}
light_source { <2.5, 29, 80> color Red}
light_source { <2.5, 27, 80> color Red}
light_source { <1.5, 25, 80> color Red}
light_source { <2.5, 23, 80> color Red}     
light_source { <1.5, 21, 80> color Red}
light_source { <2.5, 19, 80> color Red}
light_source { <2.5, 17, 80> color Red}
light_source { <1.5, 15, 80> color Red}     
light_source { <2.5, 13, 80> color Red}
light_source { <2.5, 11, 80> color Red}
light_source { <2.5, 9, 80> color Red}
light_source { <2.5, 7, 80> color Red}
light_source { <1.5, 5, 80> color Red}
light_source { <2.5, 3, 80> color Red}     
light_source { <1.5, 1, 80> color Red}
light_source { <1.5, -1, 80> color Red}
light_source { <1.5, -3, 80> color Red}
light_source { <1.5, -5, 80> color Red}
light_source { <1.5, -7, 80> color Red}
light_source { <1.5, -9, 80> color Red}
light_source { <1.5, -11, 80> color Red}
light_source { <1.5, -13, 80> color Red}
light_source { <1.5, -15, 80> color Red}
light_source { <1.5, -17, 80> color Red}  
light_source { <1.5, -19, 80> color Red}
light_source { <1.5, -21, 80> color Red}     
light_source { <2.5, -23, 80> color Red}
light_source { <1.5, -25, 80> color Red}
light_source { <1.5, -27, 80> color Red}     
light_source { <1.5, -29, 80> color Red}     
light_source { <2.5, -31, 80> color Red}
light_source { <1.5, -33, 80> color Red}
light_source { <1.5, -35, 80> color Red}
light_source { <1.5, -37, 80> color Red}
light_source { <1.5, -39, 80> color Red}
light_source { <1.5, -41, 80> color Red}
light_source { <1.5, -43, 80> color Red}
light_source { <1.5, -45, 80> color Red}
light_source { <1.5, -47, 80> color Red}
light_source { <1.5, -49, 80> color Red}
light_source { <2.5, -51, 80> color Red}
light_source { <1.5, -53, 80> color Red}
light_source { <1.5, -55, 80> color Red}
light_source { <1.5, -57, 80> color Red}
light_source { <1.5, -59, 80> color Red}
light_source { <1.5, -61, 80> color Red}
light_source { <1.5, -63, 80> color Red}
light_source { <1.5, -65, 80> color Red}
light_source { <1.5, -67, 80> color Red}
light_source { <1.5, -69, 80> color Red}
light_source { <2.5, -70, 80> color Red}
light_source { <2.5, 31, 60> color Red}
light_source { <2.5, 29, 60> color Red}
light_source { <2.5, 27, 60> color Red}
light_source { <1.5, 25, 60> color Red}
light_source { <2.5, 23, 60> color Red}     
light_source { <1.5, 21, 60> color Red}
light_source { <2.5, 19, 60> color Red}
light_source { <2.5, 17, 60> color Red}
light_source { <1.5, 15, 60> color Red}     
light_source { <2.5, 13, 60> color Red}
light_source { <2.5, 11, 60> color Red}
light_source { <2.5, 9, 60> color Red}
light_source { <2.5, 7, 60> color Red}
light_source { <1.5, 5, 60> color Red}
light_source { <2.5, 3, 60> color Red}     
light_source { <1.5, 1, 60> color Red}
light_source { <1.5, -1, 60> color Red}
light_source { <1.5, -3, 60> color Red}
light_source { <1.5, -5, 60> color Red}
light_source { <1.5, -7, 60> color Red}
light_source { <1.5, -9, 60> color Red}
light_source { <1.5, -11, 60> color Red}
light_source { <1.5, -13, 60> color Red}
light_source { <1.5, -15, 60> color Red}
light_source { <1.5, -17, 60> color Red}  
light_source { <1.5, -19, 60> color Red}
light_source { <1.5, -21, 60> color Red}     
light_source { <2.5, -23, 60> color Red}
light_source { <1.5, -25, 60> color Red}
light_source { <1.5, -27, 60> color Red}     
light_source { <1.5, -29, 60> color Red}     
light_source { <2.5, -31, 60> color Red}
light_source { <1.5, -33, 60> color Red}
light_source { <1.5, -35, 60> color Red}
light_source { <1.5, -37, 60> color Red}
light_source { <1.5, -39, 60> color Red}
light_source { <1.5, -41, 60> color Red}
light_source { <1.5, -43, 60> color Red}
light_source { <1.5, -45, 60> color Red}
light_source { <1.5, -47, 60> color Red}
light_source { <1.5, -49, 60> color Red}
light_source { <2.5, -51, 60> color Red}
light_source { <1.5, -53, 60> color Red}
light_source { <1.5, -55, 60> color Red}
light_source { <1.5, -57, 60> color Red}
light_source { <1.5, -59, 60> color Red}
light_source { <1.5, -61, 60> color Red}
light_source { <1.5, -63, 60> color Red}
light_source { <1.5, -65, 60> color Red}
light_source { <1.5, -67, 60> color Red}
light_source { <1.5, -69, 60> color Red}
light_source { <2.5, -70, 60> color Red}
light_source { <2.5, 31, 40> color Blue}
light_source { <1.5, 21, 40> color Green}
light_source { <2.5, 11, 40> color Blue}
light_source { <1.5, 1, 40> color Red}
light_source { <2.5, -11, 40> color Blue}
light_source { <1.5, -21, 40> color Green}     
light_source { <2.5, -31, 40> color Blue}
light_source { <2.5, 31, 20> color Red}
light_source { <1.5, 21, 20> color Blue}
light_source { <2.5, 11, 20> color Red}
light_source { <1.5, 1, 20> color Green}
light_source { <2.5, -11, 20> color Red}    



  plane { <-1.5, -1.75, -1>, 1
    pigment {
      checker color White, color Black
    }
  }

- - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - -
- >8 - - - - - - - - - - >8 - - - - - - - - - - >8 - - - - - - - - - - >8 -
- - - - - - - - - >8

I was exploring the potential of the plane object, and toying with camera positions as
well as light_source functions.

What puzzles me about the above program is that my Yellow light_sources are all
located at the z-axis 400 location, as follows:

		light_source { <2.5, 39, 400> color Yellow}
		light_source { <2.5, 35, 400> color Yellow}
		light_source { <2.5, 31, 400> color Yellow}
		light_source { <1.5, 21, 400> color Yellow}
		light_source { <2.5, 11, 400> color Yellow}
		light_source { <1.5, 1, 400> color Yellow}
		light_source { <2.5, -11, 400> color Yellow}
		light_source { <1.5, -21, 400> color Yellow}
		light_source { <2.5, -31, 400> color Yellow}
		light_source { <1.5, -41, 400> color Yellow}
		light_source { <2.5, -51, 400> color Yellow}
		light_source { <1.5, -61, 400> color Yellow}
		light_source { <2.5, -70, 400> color Yellow}
		light_source { <2.5, -75, 400> color Yellow}
		light_source { <2.5, -80, 400> color Yellow}

But when I put the Red light_source at the 250 z-axis location, the Yellow lights
bleed from the 400 z-axis location and taking over the 250 z-axis location that
was assigned to the Red light_source.

	In other words, now the both 250 and 400 z-axis locations are lighted with Yellow
lights. 

And when I put put Red light_source at the 100 z-axis location, the Yellow lights had
taken over that location too !

The same happened when I put Red light_source at the 80, and then 60 z-axis locations.

In summary, if I put Yellow light_source at the 400 z-axis locations, and Red
light_source at 250, 100, 80, and 60 (all z-axis) locations, instead of the intented
lighting sequence, I got the equivalent of Yellow light_source at all the 400, 250,
100, 80 and 60 z-axis locations.

Why ?

Why the Yellow lights bleed into the Red lights territories ?

Since I am a newbie, I don't know what I have done. So if there's something really
stupid that I have done, please bare with me, and please point out my mistakes.

Is there a way to have a Red light_source and a Yellow light_source sitting
side-by-side, without one taking over the other's territory ?

English isn't my mother tongue, so please forgive me for any grammar mistake or
anything that might have been unclear.

Thanks for reading !

Specs: ---

OS: MS-Windows 98SE

RAM: 512 MB

POVRAY Version: Version 3.5 for Windows.


Sincerely,
Marie
pen### [at] myrealboxcom

PS: Sorry for the cross-posting of this message. I don't know exactly which newsgroup
this message really belongs to.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.