POV-Ray : Newsgroups : povray.general : Reflection of light due to difference in the index of refraction : Re: Reflection of light due to difference in the index of refraction Server Time
26 Apr 2024 13:45:54 EDT (-0400)
  Re: Reflection of light due to difference in the index of refraction  
From: hjkqed
Date: 9 Jan 2019 16:35:00
Message: <web.5c3668e8ad3537645e43241e0@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> Le 19-01-09 à 03:04, hjkqed a écrit :
> > Hello.
> >
> > I've been trying to simulate a rather simple phenomenon in physics wherein some
> > light will be reflected and transmitted when passing through two media of
> > different indices of refraction, where the intensities of the
> > reflection/transmission depend on the how much the difference is. (pg. 405,
> > Introduction to Electrodynamics, Griffiths. Fourth Edition).
> >
> > So, technically, if we have a glass box placed in air with an ior != 1 (say, ior
> > = 2) then, when we shine light on the box, we should get some reflection of
> > light.
> >
> > I've been trying to recreate this phenomenon using the source code below, but I
> > could not get any sort of reflection. Could anyone please help me why it doesn't
> > work? Thank you so much in advance.
> >
> > --- code ---
> > #include "colors.inc"
> > #include "Glass.inc"
> > #include "textures.inc"
> >
> > global_settings {
> >   assumed_gamma 1.0
> >   photons
> >    { count 2000 }
> > }
> >
> > camera {location <0,0,-9> look_at <0,0,1> }
> > light_source {
> >   <0,0,-10>
> >   color White
> > }
> > background { Black }
> >
> > box {
> >   <-3,-3,0>, <3,3,3>
> >   pigment { Col_Glass_Clear } interior {ior 2}
> >   finish { reflection { fresnel on }}
> >   photons { target reflection on refraction on}
> > }
> >
> > box {
> >   <-3,-3,3>, <3,3,6>
> >   pigment { Col_Glass_Clear } interior {ior 1}
> >   finish { reflection { fresnel on }}
> >   photons { target reflection on refraction on}
> > }
> >
> >
> >
>
> As Clipka said, plus, the camera can never directly see the photons.
> When using photons, you need some surface for them to show on.
> To «see» the light, the finish need to have highlights enabled using
> specular or phong. Using a looks_like or associating some object with
> the light_source using an union is also an option.
>
> finish { reflection { fresnel on }} mean finish{reflection{ 0 fresnel}}
> It need to be : finish { reflection{ 1  fresnel}}
> The «on» is optional. Default to «off» when fresnel is absent, and to
> «on» when present.
>
> There is no need to use the hollow option. Here, it don't affect
> anything. It's only use is to make an object able to contain some media.
> Nothing else.
>
> In the current sample, you don't need to include glass.inc and
> texture.inc as you use nothing from those.
>
> The box with an IOR of 1 can be removed as it's invisible and have no
> effect at all. The whole environment have an IOR of 1 by default.

Thank you so much! I have fixed it as you've suggested and it works!


Post a reply to this message

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