Simulating refractive optics with POV

Simulating refractive optics with POV

Post by Matthias Richwi » Fri, 30 Jan 1998 04:00:00



Hi,

I'm trying to simulate an arrangement of lenses. But the light actually
doesn't interact with the lens material which is for example defined by

////////////
intersection
{
    sphere
    {
      < 0, 0, 0 >, 4
      translate x*3.5
     }
    sphere
    {
      < 0, 0, 0>, 4
      translate -x*3.5
    }
    pigment { color rgbft < 1.0, 1.0, 1.0, 0.0, 1.0 > }
    finish
    {
       ambient 0.0
       diffuse 0.0
       refraction on
       ior 2.0
    }
    translate x*4.0

Quote:}

////////////

giving a typical spherical lens with an index of refraction of 2 and
both radii of 4 units.

This construction does not have any effect on light shining through it,
given that the light comes directly from the source. Is it really
necessary to have the light reflected (diffusely) once as it appears to
me? When I put a checker plane as "floor" below the whole construction,
the lens reveals this and shows the distorted texture.

Any ideas? Thanks.

Matthias

 
 
 

Simulating refractive optics with POV

Post by Michael Lunda » Fri, 30 Jan 1998 04:00:00




Quote:>Hi,

>I'm trying to simulate an arrangement of lenses. But the light actually
>doesn't interact with the lens material which is for example defined by

*snip

Quote:>giving a typical spherical lens with an index of refraction of 2 and
>both radii of 4 units.

>This construction does not have any effect on light shining through it,
>given that the light comes directly from the source.

What are you trying to do? Create a lighter spot on the floor,
the same way as you do to light a fire with a magnifying-glass?
If that is the case, POV won't handle it unless you turn on
the faked caustics. Look up Section 4.8.4.5 and .6 in the POV-Ray docs.

Doing a complete and totally accurate simulation of light is nearly
impossible if you want to take *everything* into count because it
takess too much computing-power. One of the drawbacks of POV-Ray is
that it doesn't handle indirect light the same way as direct light.
However, POV cheats pretty good ;)

Describe better what you are trying to do and we'll be glad to help.

/Michael

 
 
 

Simulating refractive optics with POV

Post by Henri Sivon » Fri, 30 Jan 1998 04:00:00




>I'm trying to simulate an arrangement of lenses. But the light actually
>doesn't interact with the lens material which is for example defined by

<clip>

Quote:>When I put a checker plane as "floor" below the whole construction,
>the lens reveals this and shows the distorted texture.

With one way ray tracing form the camera to the light source, you can see
objects though lenses, but you can't see a beam of light being refracted
if you make the beam visible with atmosphere. (The same goes with
mirrors.)

You might want to try a two way ray tracer or calculate the refracted
beams yourself and set them up additional lights or cylinders where the
refracted or reflected beams should show up.

--
Henri Sivonen

WWW: http://www.clinet.fi/~henris/

 
 
 

Simulating refractive optics with POV

Post by Matthias Richwi » Sat, 31 Jan 1998 04:00:00


Hi,

my original effort was (as I mentioned before) to simulate refractive
optics, i.e. simulating special lenses being part of our actual
scientific interest and (more interesting) effects due to their surface
texture.

So, when I turn on atmosphere, I can see the beam. It just passes
through the lens as if it wasn't there. Could I solve the problem by
putting a semi-translucent, diffuse surface right after my light source
and watch the spot on this surface throug my lenses? This sould be
possible, I think.

Matthias

 
 
 

Simulating refractive optics with POV

Post by Michael Lunda » Sat, 31 Jan 1998 04:00:00




Quote:>my original effort was (as I mentioned before) to simulate refractive
>optics, i.e. simulating special lenses being part of our actual
>scientific interest and (more interesting) effects due to their surface
>texture.

Well... bending lightrays seems impossible... at least if you try
to visualise them. The following piece of code shows it rather clearly.
It's your code a bit modified.

#include "colors.inc"

camera{ location <0,0,-10> look_at <0,0,0> angle 45}

light_source{<400,0,-10> color White * 300}

plane{<0,0,-1> ,0  
      pigment{ marble color_map {[0.0 Red][1.0 White]} turbulence 1.35}
      finish {ambient 0.4}}

difference{
   box{ <50,-50,-100>, <50.1,50,100>}
   box{ <49,-0.025,-120>, <51,0.025,120> }
   box{ <49,-0.60,-120>, <51,-0.55,120> }
   box{ <49,-1.20,-120>, <51,-1.15,120> }
   box{ <49,0.60,-120>, <51,0.55,120> }
   box{ <49,1.20,-120>, <51,1.15,120> }}

intersection{
    sphere{< 0, 0, 0 >, 4 translate x*3.5}
    sphere{<0, 0, 0>, 4 translate -x*3.5}
    pigment { color rgbft < 0.0, 0.0, 0.0, 1.0, 1.0 > }
    finish  { refraction on  ior 2.0 }}

It is a lens with lightrays falling upon it. The rays have been formed
by letting a distant lightsource fall upon a thin box with slits in it.

See for yourself...

/Michael

 
 
 

Simulating refractive optics with POV

Post by ThoseCrow » Sat, 31 Jan 1998 04:00:00




>Hi,

>my original effort was (as I mentioned before) to simulate refractive
>optics, i.e. simulating special lenses being part of our actual
>scientific interest and (more interesting) effects due to their surface
>texture.

>So, when I turn on atmosphere, I can see the beam. It just passes
>through the lens as if it wasn't there. Could I solve the problem by
>putting a semi-translucent, diffuse surface right after my light source
>and watch the spot on this surface throug my lenses? This sould be
>possible, I think.

>Matthias

Hi,

It sounds like you need a different type of ray tracer.  Optical design
folks use ray tracers which allow them to quantify and visualize things
like MTF, point spread function, and various geometrical and chromatic
aberations.  I believe that POV-Ray is designed for a different purpose,
and it does not perform these calculations directly.  

You may want to perform a Web search for "geometric ray trace" or "optical
raytrace" (or similar combinations).  

Take care,
Mike Crowe

 
 
 

Simulating refractive optics with POV

Post by Henri Sivon » Mon, 02 Feb 1998 04:00:00




>So, when I turn on atmosphere, I can see the beam. It just passes
>through the lens as if it wasn't there.

Have you tried Radiance?

--
Henri Sivonen

WWW: http://www.clinet.fi/~henris/

 
 
 

Simulating refractive optics with POV

Post by Goran Begicevi » Fri, 13 Feb 1998 04:00:00



> Hi,

> my original effort was (as I mentioned before) to simulate refractive
> optics, i.e. simulating special lenses being part of our actual

*snip*

Hi Matthias.
I think that i understand what you are trying to do. Unfortunately, POV
will not handle this kind of light simulation due to ray-tracing
algorithm it uses. You might try enabling RADIOSITY option and see if it
gets better, it will use monte-carlo sampling , but not more than 2
bounces.
Only non-custom optic program that will solv your problem are those
using so called backwards-tracing or path-tracing. They will sucessfully
simulate global illumination artefacts, at the cost of rendering speed.

 
 
 

1. Simulating lens-optics with Povray?

 Is it possible to use Povray (2.2) to simulate lens-optics (camera
lenses,
telescopes,microscopes...)?
I think the scene should be something like this:

     p(film)                  w
     l                        a  
     a    camera               lens                       "My
     n    looking left        (glass objects)                world"
     e                        l                                
                              l

 What I'm looking for is a way to study the properties of different
lenses rather than take virtual photographs.
Placing some point- and "line"-lights  in "my world" should be enough
to accomplish this.
Has anyone had any experiences doing this?

What is the camera in Povray like?An ordinary pinhole camera?

Thanks!

    Heikki M Jaakkola

2. CAD archives and/or newsgroup(s)?

3. optics simulations using POV (laser/lenses ?)

4. Printing a TGraphicControl

5. optics simulations using POV (laser/lenses)

6. Learning to use a Graphics Tablet

7. Simulating a focusing light beam in POV-ray

8. trueSpace 2.0 !

9. POV - how to simulate direction lights

10. A refractive-transparency problem!

11. refractive index

12. Compositing refractive objects

13. Refractive Hypervoxels