POV-Ray : Newsgroups : povray.general : Reflection of light due to difference in the index of refraction Server Time: 17 Jan 2019 02:42:49 GMT
 Reflection of light due to difference in the index of refraction (Message 1 to 8 of 8)
 From: hjkqed Subject: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 08:05:00 Message:
```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
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}
}
```
 From: Jim Holsenback Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 09:59:59 Message: <5c35c61f\$1@news.povray.org>
```On 1/9/19 3:04 AM, hjkqed wrote:
> 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
> 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}
> }
>
>
>
well i see at /least/ two issues ... no value for reflection and hollow
is missing from the boxes

http://wiki.povray.org/content/Reference:Finish#Specular_Reflection
http://wiki.povray.org/content/Reference:Hollow_Object_Modifier
```
 From: jr Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 11:05:01 Message:
```hi,

"hjkqed" <nomail@nomail> wrote:
> 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, ...
> 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.

after adding the '#version' and lowercasing "Glass.inc" in your code, all I get
is black/nothing displayed.

regards, jr.
```
 From: Bald Eagle Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 12:30:00 Message:
```"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "hjkqed" <nomail@nomail> wrote:
> > 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, ...
> > 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.
>
> after adding the '#version' and lowercasing "Glass.inc" in your code, all I get
> is black/nothing displayed.
>
>
> regards, jr.

Because there's no light source?
```
 From: clipka Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 15:36:23 Message: <5c3614f7\$1@news.povray.org>
```Am 09.01.2019 um 09:04 schrieb hjkqed:

> I've been trying to recreate this phenomenon using the source code below, but I
> work? Thank you so much in advance.

You need something to reflect.

This may sound trivial at first, but there's a catch: Light sources
don't show up directly in the image (unless you assign a `looks_like`
object), nor do they show up as reflections via the `reflection`
mechanism (or as refractions, for that matter).

The mechanism by which reflections of light sources are made visible is
via the specular highlights (`specular` and/or `phong`) mechanisms.

To better control the magnitude of specular highlights, I recommend
using the `albedo` keyword to get the same scale as the `reflection`
setting (otherwise the brightness is difficult to control and depends on
the tightness of the highlights, i.e. the `roughness` and/or
`phong_size` parameters). To make them conform to the Fresnel law you
need to specify `fresnel on` right in the `finish` block (as opposed to
the `reflection` block). (Requires POV-Ray v3.8.)

I recommend `specular` (being the more realistic model) with a very low
`roughness` setting.
```
 From: Alain Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 16:03:25 Message: <5c361b4d@news.povray.org>
```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
> 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.
```
 From: jr Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 18:50:01 Message:
```hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ... is black/nothing displayed.
>
> Because there's no light source?

it was a quick look just before RL activity, but reading subsequent posts,
likely, I'd have been stumped at that point anyway.  :-)

regards, jr.
```
 From: hjkqed Subject: Re: Reflection of light due to difference in the index of refraction Date: 9 Jan 2019 21:35:00 Message:
```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!
```