POV-Ray : Newsgroups : povray.general : location dependant refractive index : Re: location dependant refractive index Server Time
30 Jul 2024 16:18:46 EDT (-0400)
  Re: location dependant refractive index  
From: feestje
Date: 3 Nov 2008 07:10:02
Message: <web.490ee945a1a15775934be4af0@news.povray.org>
btw: the entire code is:

#include "colors.inc"

global_settings { max_trace_level 100 }


object {
 sphere { <0,0,0>,10 }
 pigment {
  color  Black
 }
 finish {
  phong 1
  phong_size 10
 }
}







#declare Index = 1;
#declare Indexmax=20;
#declare lower_ior = 1;
#declare upper_ior = 2;
#declare hight_boundarylayer = 7;
#declare surface=15;




#while(Index <= Indexmax)


// hotter medium
box {
     < -50,(-surface+(Index-1)*hight_boundarylayer/Indexmax) , -20 >,    //
lower-left corner
     <  50, (-surface+(Index)*hight_boundarylayer/Indexmax) ,  20 >     //
upper-right corner


          pigment {
          color White filter 1
     }

     interior {
          ior (lower_ior+((upper_ior-lower_ior)/Indexmax)*Index)
     }
}
      #declare Index = Index + 1;
#end


//normal medium
box{
<-50,-20+hight_boundarylayer,-20>
<50,50,20 >

          pigment {
          color White filter 1
     }

     interior {
          ior upper_ior
     }
}

//surface (heater)
 box{
<-50,-surface,-20>
<50,-50,20 >

          pigment {
          color Blue      }
           finish {
          ambient 0.3 }

}


light_source
{ <0,0,0>, 1
  looks_like {
  plane {
     z, 1000
     pigment {
         color White  }
             finish {
          ambient 1000 }

}  }}










camera {
     location  -10*y- 1000*z
     direction 50*z
     up        y
     right 4/3*x

}


Post a reply to this message

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