POV-Ray : Newsgroups : povray.advanced-users : I need help whit a laser beam reflection Server Time
24 Dec 2024 07:10:20 EST (-0500)
  I need help whit a laser beam reflection (Message 1 to 4 of 4)  
From:
Subject: I need help whit a laser beam reflection
Date: 5 Mar 2008 14:15:00
Message: <web.47cef0ccceab9865a0bf9ac50@news.povray.org>
Hi,
I'm trying to simulate a laser beam using photons through an optical path.
I saw many exemples of this (how to see the beam, functions of radius, count,
spacing, media,...) but when I'm trying to do this by myself, the beam after
reflection is always composed by many distant luminous points.
After many hours of working and manipulations of settings, I'm not able to do
anything to correct this.

This is a simplification of my code.
If you know the problem and are able to do something, could you indicate me the
right code?

Thank you
Sylvain

#version 3.6;
#include "colors.inc"
#include "math.inc"
#include "arrays.inc"
#include "analytical_g.inc"

#declare Use_Photons = yes;

global_settings
        {
        assumed_gamma 1.0 max_trace_level 50
        #if(Use_Photons)
                photons
                {
                autostop 0 count 200000 spacing 0.01 radius 0.05 media 1000
                }
        #end
        }
camera
        {
        angle 90 right -x*image_width/image_height
        location  < 30 , 0 , 0>
        look_at   <0.0 , 0 ,0>
        //Rotate_Around_Trans(<-40,0,0>,<0,0,1000>)
        //rotate <0,90,0>
        }

sphere{<0,0,0>,1 hollow texture{pigment{gradient <0,1,0> color_map{[0.0 color
Black][0.8 color rgb<0.1,0.6,0.9>][1.0 color rgb<0.1,0.6,0.9>]}}finish {ambient
1 diffuse 0}}scale 10000}

#declare Scatter_M = material {texture {pigment { rgbt 1 }finish {ambient 0
diffuse 0}} interior {media {method 3 intervals 1 samples 70, 1000 scattering
{1, rgb 0.1 extinction 0.00001}}}}
sphere {<0,0,0>, 400 hollow material { Scatter_M }  photons {pass_through }}

#declare P1MP = <0, 1, 1 >;
#declare P2MP = <0, -1,-1 >;
#declare P3MP = <0, 1, -1>;
#declare P4MP = <0, -1, 1 >;

polygon{
        5, P1MP, P3MP, P2MP, P4MP, P1MP
        hollow
        finish { reflection {1.0} ambient 0 diffuse 0 }
        pigment { White }
        photons {target reflection on refraction off collect off}
        rotate y*-45
        rotate z*-45
        }

light_source { y*20, Red*10 cylinder  radius 0 falloff 0.5 tightness 0.5
photons {reflection on refraction on} point_at 0 Rotate_Around_Trans(<0,0,45>,
0)}


Post a reply to this message

From: Tim Attwood
Subject: Re: I need help whit a laser beam reflection
Date: 5 Mar 2008 18:55:17
Message: <47cf32e5@news.povray.org>
> I'm trying to simulate a laser beam using photons through an optical path.
> I saw many [examples] of this (how to see the beam, functions of radius, 
> count,
> spacing, media,...) but when I'm trying to do this by myself, the beam 
> after
> reflection is always composed by many distant luminous points.
> After many hours of working and manipulations of settings, I'm not able to 
> do
> anything to correct this.

The light source shouldn't be inside the media object.

The media object is the target for photons to be deposited on.

The media statement in global photons controls the balance
between photons deposited on media and on normal surfaces.
Something like media 1000,0.1 will make most of the photons
deposit in the media.

The camera probably shouldn't be inside the media object either.


Post a reply to this message

From:
Subject: Re: I need help whit a laser beam reflection
Date: 6 Mar 2008 08:40:02
Message: <web.47cff3026f3acb29a0bf9ac50@news.povray.org>
> The light source shouldn't be inside the media object.
>
> The media object is the target for photons to be deposited on.
>
> The media statement in global photons controls the balance
> between photons deposited on media and on normal surfaces.
> Something like media 1000,0.1 will make most of the photons
> deposit in the media.

thank you but, these lines

sphere{<0,0,0>,1 hollow texture{pigment{gradient <0,1,0> color_map{[0.0 color
Black][0.8 color rgb<0.1,0.6,0.9>][1.0 color rgb<0.1,0.6,0.9>]}}finish {ambient
1 diffuse 0}}scale 10000}

#declare Scatter_M = material {texture {pigment { rgbt 1 }finish {ambient 0
diffuse 0}} interior {media {method 3 intervals 1 samples 70, 1000 scattering
{1, rgb 0.1 extinction 0.00001}}}}
sphere {<0,0,0>, 400 hollow material { Scatter_M }  photons {pass_through }}

aren't present for the simulation. The second block is only to see the beam.
Unfortunately, my problem is still present.

Thank you again
Sylvain


Post a reply to this message

From: Tim Attwood
Subject: Re: I need help whit a laser beam reflection
Date: 7 Mar 2008 01:10:10
Message: <47d0dc42$1@news.povray.org>
Try this code, photons are touchy...

#version 3.6;
#include "colors.inc"

#declare Use_Photons = yes;
global_settings {
   assumed_gamma 1.0 max_trace_level 99
   #if (Use_Photons)
      photons {
         spacing 0.01
         autostop 1
         radius 0.05
         media 1000,0.1
      }
   #end
}

camera {
   location  <0, 0, -11>
   right -x*image_width/image_height
   look_at   <0.0 , 0 ,0>
   angle 30
}

sphere { // background
   <0,0,0>,1
   inverse
   texture {
      pigment {
         gradient <0,1,0>
         color_map {
            [0.0 color rgb<0.1,0.6,0.9>]
            [0.8 color Black]
            [1.0 color rgb<0.1,0.6,0.9>]
         }
      }
      finish {
         ambient 1
         diffuse 0
      }
      translate 0.5*y
   }
   scale 42
}

#declare Scatter_M = material {
   texture {
      pigment { color rgbf 1 }
   }
   interior {
      media {
         scattering {1, color White extinction 0.01}
         method 3
         intervals 10
         samples 70, 1000
      }
   }
}

light_source {<5, 15, 0>, color rgb < 1, 0, 0>*10
    spotlight radius 0.02 falloff 0.10 point_at < 0, 0, 0>
    photons {refraction on reflection on}
}

box {<-1,0,-1>,<1,-0.001,1>
   rotate <0,0,45>
   rotate <0,-45,0>
   pigment {White}
   finish {ambient 0 diffuse 0 reflection 1}
   photons {reflection on}
}

box {<-3,0.001,-3>,<3,3,3>
   hollow
   rotate <0,0,45>
   rotate <0,-45,0>
   material { Scatter_M }
   photons {target}
}


Post a reply to this message

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