POV-Ray : Newsgroups : povray.general : ray of light line laser with projector : ray of light line laser with projector Server Time
25 Apr 2024 13:07:24 EDT (-0400)
  ray of light line laser with projector  
From: CRIS
Date: 6 Feb 2012 14:25:01
Message: <web.4f30284f95c8b71f60feafb60@news.povray.org>
Hi guys. I have to simulate a rays of light of a line laser.
(http://laserlineoptics.com/powell_primer.html) I do this with a Projector (a
small prism) and a standard light source. I dont' understand why if i use a
spotlight doesn't work , that is the line that is projected on the box is short
but if i use a standard light source the line that is projected seems to be
correct. Another question : why don't if i multiply a color of 'red principal
light' by a constant i see also the ray of light that hits internal diagonal
bars? the code is this:

//-----------------------------------------------

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"
#include "stones.inc"



// camera normale
camera {
location <00.0, 20.0,-40.0>
look_at <0.0, 10.0, 0.0>
blur_samples 50

       }

// camera 2
/*camera {
location <10.0, 20.0,30.0>
look_at <-10.0, 10.0, 0.0>
blur_samples 50

       }   */



 declare a= 1;
 declare b=0.54;
 declare Projector = prism   {
          linear_spline
          3, 3.002, 4,
          <0,0>, <-a,b>,<a,b>, <0,0> //outer rim
           texture{ pigment{ color Red } }


        }


 // principal light
 light_source{ <0,3.001,-0.1>
 //light_source{ <0,3.001,-0.9>
        color Red     // if i multiply *100 i see light on internal bar
        /*spotlight
        radius 10
        falloff 20
        tightness 20
        point_at <0, 3.015, 2>  */


        projected_through { Projector }

 } //end of light_source

 Projector

  // box test  laser line
 box {


        < 125, 10, 95>
        texture { DMFLightOak }
 translate z*-45

        }



#declare bars =

union {

        box {


        texture {
                T_Stone25 // predefinita da stones.inc
                //pigment {Green}
                //scale 10 //
                }


             }

        box {


        texture {
                T_Stone25 // predefinita da stones.inc
                //pigment {Green}
                //scale 10 //
                }

             }

        rotate y*-45
        translate x*-0.2
        translate z*-6



      }

bars

//another light

light_source { <5, 30, -30> color White }
//------------------------------------------------


Post a reply to this message

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