POV-Ray : Newsgroups : povray.advanced-users : I need help whit a laser beam reflection : Re: I need help whit a laser beam reflection Server Time
5 Jul 2024 14:48:25 EDT (-0400)
  Re: I need help whit a laser beam reflection  
From: Tim Attwood
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.