POV-Ray : Newsgroups : povray.general : Scattering media and photons : Re: Scattering media and photons Server Time
3 Aug 2024 16:18:53 EDT (-0400)
  Re: Scattering media and photons  
From: Phil Cook
Date: 30 Mar 2004 08:18:57
Message: <opr5ofawzup4ukzs@news.povray.org>
On Wed, 17 Mar 2004 10:05:13 -0000, Phil Cook 
<phi### [at] nospamdeckingdealscouk> wrote:

> On Tue, 16 Mar 2004 20:42:31 +0000, IMBJR <no### [at] spamhere> wrote:
>
> <snip>
>> How odd. Unless I'm misreading the documentation, we should be able to
>> do this. I'm sure I've see a classic Dark Side Of The Moon prism with
>> refracted beam done in POV. I can't see why reflections should be any
>> different.
>
> It was Tim Cook in p.b.i. 28/10/03 a refracting prism using a point 
> light inside a sphere with a cut-out, and presumably a 
> interior{dispersion}. If you switch off all the reflection on my 
> LightReflector,  add a transparency or filter and switch back to the 
> overhead view, the light beam does pass straight through and show up on 
> the other side. However if you add 'refraction on' to the photon block 
> it vanishes.
>
> It does seem strange to me, but again that may be to do with my 
> ignorance in how this works, I'm sure someone else can answer this much 
> better than I.

Well I've gone through optics.pov which shows reflected beams etc., 
unfortunately without explaining how it works, and pulled together the 
following scene with comments. If anyone can offer an explaination why 
both refraction and reflection need to be on in the light_source; why the 
light_source must be outside the media container in order to get a 
reflected beam; and why a cylinder light_source produces sharp edges in 
the original beam with refraction on, I'd be most interested.

--
Phil

//code
global_settings{
photons{
/*
Photon count seems to be inversely linked to the radius of the cylinder 
light_source
smaller radius needs higher count
*/
count 150000
media 100, 2
}
}

/*
This seems to be important as it appears that the light_source must be 
outside the media
so no global media allowed
*/
box{-20,20 hollow
texture {pigment{rgbt 1}}
interior{
media{
/*
Note the higher rgb value and the extinction 0 to turn absorption off
comment out extinction and beams vanish
*/
scattering{1,rgb 1 extinction 0}
method 3 intervals 1 samples 4
}
}
/*
Without this no reflected beam
*/
photons{target}
}

/*
Light source must originate outside media container
switch to 10 and only original beam shows
*/
light_source{x*25, rgb<1.2,1,1.5>
cylinder
/*
see photon count
*/
radius 0.5 //falloff 0.5
point_at x*-10
/*
This is weird
try
photons{refraction on reflection off}
photons{refraction off reflection on}
photons{refraction off reflection off}
Why does the reflected beam only show up when both are on?
*/
photons{refraction on reflection on}
}

camera{
location y*10
look_at 0
}

prism{-1,1,4
0,<0,6>,<6,0>,0
texture{
pigment {color rgb 1}
finish {ambient 0 diffuse 0 reflection 1}
}
translate <-3,0,-3>
}
//end code

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

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