POV-Ray : Newsgroups : povray.newusers : I Need Help With Media : Re: I Need Help With Media (small sample image) Server Time
30 Jul 2024 18:10:24 EDT (-0400)
  Re: I Need Help With Media (small sample image)  
From: Danny
Date: 21 May 2004 16:25:00
Message: <web.40ae64ea865d73e4ffb015460@news.povray.org>
Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
> On Fri, 21 May 2004 00:27:24 EDT, Danny <danzaetz> wrote:
>
> <snip>
> > I still can't figure out how to get rid of the images on the surface of
> > the
> > laser.  Please help.
> >
>
> Have you thought about doing it as a cylinder light_source, slower but it
> might solve your problem:
>
> //code
> union{
> cylinder{0,x*100, 1 hollow
> pigment {rgbt 1}
> interior{
> media{
> scattering{3,1}
> density{
> cylindrical rotate 90*z
> color_map{
> [0 rgb 0]
>
> [0.5 red 3]
> [0.9 rgb 5]
>
> [1 rgb 10]}
> }
> }
> }
> scale <1,.2,.2>
> }
>
> light_source{0 rgb 10 cylinder point_at x*100}
> translate<-50,0,10>
> }
> //end code
>
> This is done with a non-defined camera so you'll need to tweak the
> intensities and translate to get it to look right.
>
> HTH
>
> --
> Phil Cook
> --
> All thoughts and comments are my own unless otherwise stated and I am
> happy to be proven wrong.

Is this cylinder light_source supposed to produce a visible light beam that
can be seen outside where it's pointing at, or is it more like a laser pen
that produces a dot on the surface it's aimed at? I tried it along with
scattering and it did nothing to get rid of the images.
Also, in order to round off the ends of my laser beam, I put some
half-spheres on either end, both filled with the same media, except the
density is spherical instead of cylindrical.  For some reason, this created
tons more problems.  When you look at the half-spheres perpendicularly,
there's no problem, but when you look at them obliquely, you get very odd
results, such as grey rings, spots, etc.  Here's what I'm doing:

 #default {
   texture {
  pigment {Grey}
    finish {
     diffuse 0.6
      ior 1.5
      ambient 0.300000
      phong 0.5
      phong_size 50
}
}}


camera {
  location <0,0.5,2>
  look_at <0,0.5,0>
}

background {color rgb <0,0,0>}

light_source {
  <-1000.000000,1000.000000,1000.000000>       //  x=-1000,y=1000,z=1000
  color rgb <1.0000,1.0000,1.0000>
           }

#declare clock1=1;

union{
cylinder{<0,2*clock1,0>,<0,0,0>, 1                 //the laser, top right
from front
         texture {
    pigment { color rgbt 1}}
       interior{media{emission rgb 1
       density{ cylindrical
       color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
5][1 rgb 10]
       }}}
       hollow
       scale<0.1, 1, 0.1>
       }
difference{
sphere{<0,0,0>, 1
         texture {
    pigment { color rgbt 1}}
       interior{media{emission rgb 1
       scattering{3,1}
       density{ spherical
       color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
       }}}
       hollow
       scale<0.1, 0.1, 0.1>
       translate <0,2*clock1,0>
       }
cylinder{<0,2*clock1,0>,<0,0,0>,5}
       }
difference{
sphere{<0,0,0>, 1
         texture {
    pigment { color rgbt 1}}
       interior{media{emission rgb 1
       density{ spherical
       color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
       }}}
       hollow
       scale<0.1, 0.1, 0.1>
       }
cylinder{<0,5,0>,<0,0,0>,5}
        }
light_source{0 rgb 10 cylinder point_at y*2}
}

sphere{<.2,.5,-.5>,0.1}


Try running this and you'll see the image of the sphere on the laser.
You'll also see the grey ring where the laser cylinder and the laser
half-sphere meet(try looking at that location perpendicularly and the grey
ring disappears).
You can also see a small white dot on the bottom half-sphere, which is also
an image of the grey sphere.  I have a background of stars, and so the ends
of my laser end up looking speckled.  How can I make all those images and
grey rings go away?


Post a reply to this message

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