|
|
Thank you for expanding so much effort to educate me, and I apologize for
introducing the confusion with the mirror shape.
While playing with the scene you generously provided, I found it helpful to
decrease the intensity of the light source in order to get a better
understanding of the central white spot one gets when using the light source
of intensity close to 1.
Thanks again,
Goran
"hughes, b." <omn### [at] charternet> wrote in message
news:3dca028d@news.povray.org...
> I just can't win when I'm doing this stuff immediately to help people.
> Hopefully I'm not to late to say that the #switch directive was left out
> before.
>
> Oh well, gives me a chance to post this new scene file which writes and
> reads the results.
>
>
> /* how to test flashlight beam on wall for brightness */
>
>
> /* use appropriate command for each rendering or you'll overwrite the
image
> */
>
> // create scene
> // cmd:+fn +oC:\images\flashlite.png
>
> // write file
> // cmd:-f
>
> // read file
> // cmd:-f
>
>
> // which scene? 1 or 2, any other number to read file
> #declare Scene=0;
>
> #switch (Scene)
> #case(1)
> /* setup scene */
> global_settings {
> photons {
> spacing 0.02
> // autostop 0
> }
> }
>
> camera {
> location <0, 0, 0>
> look_at <0, 0, 1>
> }
>
> // I used a different paraboloid here
> quadric {
> <0.5, 0.5, 0>, <0, 0, 0>, <0, 0, -1>, 0
> clipped_by {
> plane {z,2} // wide end opening
> plane {-z,-0.2} // narrow end opening
> }
> texture {
> pigment {rgb 0.5}
> // a little imperfection for realism
> normal {dents 0.05 turbulence <0.2,0.2,0.4> scale <0.3,0.3,0.9>}
> // surface finish
> finish { ambient 0 diffuse 0 specular 0.99 roughness 0.003
> reflection {0.95}
> }
> }
> photons {
> target
> reflection on
> refraction off
> collect off
> }
> }
>
> // Define a plane on which to measure the light
> plane { z, 7.0
> pigment { color blue 1 }
> finish {
> // specular highlights, other finish characteristics might be important
> ambient 0.1 diffuse 0.2 specular 0.1 roughness 0.09
> }
> photons {
> target
> reflection off
> refraction off
> collect on
> }
> }
>
> // Define a light source
> light_source { <0, 0, 1>, <0.7, 0.8, 0.9>
> fade_distance 3
> fade_power 1
> photons {
> reflection on
> refraction off
> }
> }
>
> #break
> #case (2)
> /* testing scene */
>
> // Find light intensity (pigment of plane)
>
> #include "functions.inc"
>
> #declare Image=
> pigment {
> image_map {
> png "flashlite.png"
> once
> }
> translate -0.5
> scale <4/3,1,1>
> }
>
> plane {z,1
> pigment {Image}
> finish {ambient 1 diffuse 0}
> }
>
> camera {
> orthographic
> location 0
> look_at z
> right 4/3*z
> up y
> }
>
>
> #declare I=0.1; // increment
>
> #fopen FlashLight "c:\\images\\flashlight.txt" append
>
> #declare X=-4/3/2;
>
> #while (X<=+4/3/2)
>
> #declare Y=-1/2;
>
> #while (Y<=+1/2)
>
> #declare Point=<X,Y,0>;
>
> #declare Intensity = eval_pigment(Image, <Point.x, Point.y, Point.z>);
>
> #write (FlashLight
> concat(
> str(Point.x,1,-1),
> ",",
> str(Point.y,1,-1),
> ",",
> str(Intensity.gray,1,-1),
> ",\n" // last comma so data can be read later
> )
> )
>
> #declare Y=Y+I;
>
> #end
>
> #declare X=X+I;
>
> #end
>
> #fclose FlashLight
>
> #break
>
> #else // if not 1 or 2
>
>
> /* Scene!=1|2 */
>
> #fopen FlashLight "c:\\images\\flashlight.txt" read
>
> #while (defined (FlashLight))
>
> #read (FlashLight, Px, Py, Il)
>
> #debug concat(str(Il,1,-1),"\n") // anything else could be done here
>
> #end
>
> #end // switch
>
>
Post a reply to this message
|
|