POV-Ray : Newsgroups : povray.newusers : Cylindrical light Server Time
31 Oct 2024 12:18:05 EDT (-0400)
  Cylindrical light (Message 1 to 2 of 2)  
From: Davide @ VU
Subject: Cylindrical light
Date: 25 Mar 2008 12:50:00
Message: <web.47e93aec2bbe3e7cc7922a410@news.povray.org>
I am trying to make a very simple cylindrical light that glows in the dark
(similar to, say, the blade of the lightsaber of Star Wars). If I use:

#include "colors.inc"
#include "glass.inc"
#include "textures.inc"


camera {
location <55-10,0,0>
look_at <0,0,0>
angle 40
rotate <0,0,0>
}


#declare transp = texture {
   pigment {rgbt < 1, 0, 0, 1>}
   finish {reflection 0}
}

cylinder
 {<0,-10,0>,<0,10,0>,40 texture{transp} hollow
  interior
   { media
     { emission 2
       density
       { cylindrical density_map
        { [0.2 rgb <0,0,0>]
           [0.6 rgb <0.05,0,0>]
           [0.7 rgb<0.08.0,0>]
           [0.8 rgb <0.1,0,0>]
           [0.95 rgb <0.2,0,0>]
           [1 rgb <1,1,0>]
         }
       }
     }
  }
rotate <90,0,0>
scale<4,4,4>
 }


light_source{
<0, -50, 0>
color Red
shadowless
}

light_source{
<0, -100, -300>
color White
}




I obtain what I want. However, I must first create the object in the y direction
and then rotate it, while I would like to create it directly along the
orientation I want. Anybody knows a way to do it?

Furthermore, I obtain the blobs at the ends, which I could eliminate with
"difference", but, still, is there another way?

Thanks.


Post a reply to this message

From: Alain
Subject: Re: Cylindrical light
Date: 25 Mar 2008 16:15:40
Message: <47e96b7c$1@news.povray.org>
Davide @ VU nous apporta ses lumieres en ce 2008/03/25 13:48:
> I am trying to make a very simple cylindrical light that glows in the dark
> (similar to, say, the blade of the lightsaber of Star Wars). If I use:
> 
> #include "colors.inc"
> #include "glass.inc"
> #include "textures.inc"
> 
> 
> camera {
> location <55-10,0,0>
> look_at <0,0,0>
> angle 40
> rotate <0,0,0>
> }
> 
> 
> #declare transp = texture {
>    pigment {rgbt < 1, 0, 0, 1>}
>    finish {reflection 0}
> }
> 
> cylinder
>  {<0,-10,0>,<0,10,0>,40 texture{transp} hollow
>   interior
>    { media
>      { emission 2
>        density
>        { cylindrical density_map
>         { [0.2 rgb <0,0,0>]
>            [0.6 rgb <0.05,0,0>]
>            [0.7 rgb<0.08.0,0>]
>            [0.8 rgb <0.1,0,0>]
>            [0.95 rgb <0.2,0,0>]
>            [1 rgb <1,1,0>]
>          }
>        }
>      }
>   }
> rotate <90,0,0>
> scale<4,4,4>
>  }
> 
> 
> light_source{
> <0, -50, 0>
> color Red
> shadowless
> }
> 
> light_source{
> <0, -100, -300>
> color White
> }
> 
> 
> 
> 
> I obtain what I want. However, I must first create the object in the y direction
> and then rotate it, while I would like to create it directly along the
> orientation I want. Anybody knows a way to do it?
Unless you are ready to use an uniform density media of use some user defined 
density function, No.
> 
> Furthermore, I obtain the blobs at the ends, which I could eliminate with
> "difference", but, still, is there another way?
> 
> Thanks.
> 
> 
It may be beter to have one of the extremity at, or close to, the origin. That 
way, later rotations and rotations will be easier. If the center point of the 
handle start at <0,0,0> it's much easier to orient and place as you need.
You don't realy need that red light at one end. The emissive media is visible 
without the light and don't interact with your lights.


-- 
Alain
-------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood of
patriots and tyrants.
Thomas Jefferson


Post a reply to this message

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