POV-Ray : Newsgroups : povray.general : help Server Time
1 Nov 2024 01:23:27 EDT (-0400)
  help (Message 1 to 2 of 2)  
From: CAS
Subject: help
Date: 8 Apr 2014 10:05:00
Message: <web.5344018e8875cac6a92a3a00@news.povray.org>
#version 3.7;
global_settings{ assumed_gamma 1.0 }
#include "spectral.inc"
#declare SpectralWavelength =730;

#declare camera_za=0;
#declare camera_aa=0;
#declare camera_h=4267.2;
#declare camera_dist=4267.2+435;

#declare camera_y = camera_dist*cos(radians(camera_za));
#declare camera_LL = camera_dist*sin(radians(camera_za));
#declare camera_x = camera_LL*sin(radians(camera_aa));
#declare camera_z = camera_LL*cos(radians(camera_aa));
camera
{
angle  7.54371
location <camera_x,camera_y,camera_z >
look_at <0,0,0>
rotate <0,-31,0>
right x
up y
}
#declare sun_za = 31.65;
#declare sun_aa = 187.89;
#declare sun_dist = 152589828000;

#declare sun_y = sun_dist*cos(radians(sun_za));
#declare sun_LL = sun_dist*sin(radians(sun_za));
#declare sun_x = sun_LL*sin(radians(sun_aa));
#declare sun_z = sun_LL*cos(radians(sun_aa));
light_source {<sun_x,sun_y,sun_z>
             SpectralEmission(E_D65)* 1.33015
             }

#declare geom_file_name = "pov-xyz.txt";
#declare spec_file_name = "pov-ref.txt";
// find max_x,max_y,max_z
#declare max_x=689768.244495;
#declare max_y=0.000000;
#declare max_z=5200554.798986;
#fopen   Input_geom_file geom_file_name read
#while(defined(Input_geom_file))
    #read(Input_geom_file,x1,y1,z1,x2,y2,z2,x3,y3,z3)
    #if(x1>max_x)
        #declare max_x = x1;
    #end
    #if(x2>max_x)
        #declare max_x = x2;
    #end
    #if(x3>max_x)
        #declare max_x = x3;
    #end
    #if(y1>max_y)
        #declare max_y = y1;
    #end
    #if(y2>max_y)
        #declare max_y = y2;
    #end
    #if(y3>max_y)
        #declare max_y = y3;
    #end
    #if(z1>max_z)
        #declare max_z = z1;
    #end
    #if(z2>max_z)
        #declare max_z = z2;
    #end
    #if(z3>max_z)
        #declare max_z = z3;
    #end

#end
#debug concat(str(max_x,15,2),str(max_y,15,2),str(max_z,15,2),"\n")


#declare min_x=688921.731000;
#declare min_y=0.000000;
#declare min_z=5199708.285491;
#fopen   Input_geom_file geom_file_name read
#while(defined(Input_geom_file))
    #read(Input_geom_file,x1,y1,z1,x2,y2,z2,x3,y3,z3)
    #if(x1<min_x)
        #declare min_x = x1;
    #end
    #if(x2<min_x)
        #declare min_x = x2;
    #end
    #if(x3<min_x)
        #declare min_x = x3;
    #end
    #if(y1<min_y)
        #declare min_y = y1;
    #end
    #if(y2<min_y)
        #declare min_y = y2;
    #end
    #if(y3<min_y)
        #declare min_y = y3;
    #end
    #if(z1<min_z)
        #declare min_z = z1;
    #end
    #if(z2<min_z)
        #declare min_z = z2;
    #end
    #if(z3<min_z)
        #declare min_z = z3;
    #end
#end
#debug concat(str(min_x,15,2),str(min_y,15,2),str(min_z,15,2),"\n")


#declare center_x = (min_x+max_x)*0.5;
#declare center_y = (min_y+max_y)*0.5;
#declare center_z = (min_z+max_z)*0.5;
#debug concat(str(center_x,15,2),str(center_y,15,2),str(center_z,15,2),"\n\n")

#declare n = 0;
#fopen   Input_geom_file geom_file_name read
#fopen   Input_spec_file spec_file_name read
#while(defined(Input_geom_file))

    #read(Input_geom_file,x1,y1,z1)
    #read(Input_spec_file,ref)
         sphere
        {

      <x1-center_x,y1-center_y,z1-center_z>,
           1.55
           finish {
                 ambient 0
                 emission 0
                 specular ref
                   }
          }

    #declare n = n + 1;
#end
#debug concat(str(n,15,2),"\n")

Above is all my code,I have some confusions:
1,"SpectralEmission(E_D65)* 1.33015" my solar irradiance in 730nm is 1.33015.Can
I set statements like that ?
2,how does pov calculate the luminance value of each pixel in final image,having
some forlums?
3,I want to know  pov use phong or whitted model to calculate the luminance of
each pixel in screen?
I am so sorry to trouble,but these problems have confusing me for a long time.I
am so sad.Thank you!


Post a reply to this message

From: Alain
Subject: Re: help
Date: 9 Apr 2014 12:37:08
Message: <53457734@news.povray.org>


> Above is all my code,I have some confusions:
> 1,"SpectralEmission(E_D65)* 1.33015" my solar irradiance in 730nm is 1.33015.Can
> I set statements like that ?
> 2,how does pov calculate the luminance value of each pixel in final image,having
> some forlums?
> 3,I want to know  pov use phong or whitted model to calculate the luminance of
> each pixel in screen?
> I am so sorry to trouble,but these problems have confusing me for a long time.I
> am so sad.Thank you!
>
>
>

1 - Yes. "SpectralEmission()" return a colour vector. When you multiply 
a vector by a number, you realy perform this:
<0.1,0.2,0.05>*1.33015 is transformed as:
<0.1,0.2,0.05>*<1.33015,1.33015,1.33015> or:
<0.1*1.33015, 0.2*1.33015, 0.05*1.33015>

2 - Not sure what your "forlums" mean.

3 - As has been mentioned before, POV-Ray use the Phong lighting model.



Alain


Post a reply to this message

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