POV-Ray : Newsgroups : povray.newusers : Sci-fi Lasers ?? help ! : Re: Sci-fi Lasers ?? help ! Server Time
29 Jul 2024 10:22:50 EDT (-0400)
  Re: Sci-fi Lasers ?? help !  
From: Bob Hughes
Date: 4 Feb 2006 22:03:43
Message: <43e56b0f$1@news.povray.org>
"B-rat" <Bra### [at] gmailcom> wrote in message 
news:web.43e506cc9034a67279d64170@news.povray.org...
> for at the moment, the problem being that i cant determin exactly where it
> will start and where it will end...

Oh... yeah... I overlooked that aspect, sorry.

I'm not sure if it could be done in a better way than the following example. 
The problem is with the starting point having to be at the origin instead of 
any vector, which then necessitates that object (the firing ship?) being 
positioned correctly first. But at least the target can be anyplace (I 
think-- I didn't check negative vectors). Chances are it could be done 
another way but this is all I came up with.

#include "transforms.inc"

#declare A = 0;  // origin (where beam begins)
#declare B = <6,4,2>;  // beam target location
#declare W = 0.2;  // width of beam

cylinder {A, B, W
 hollow
    texture {pigment {color rgbf 1}}
    interior {
        media {
         scattering {1, color rgb <0.9,0,0.3> extinction 0}
         emission <0.9,0,0.3>*3
         absorption <0.3,0.9,0.3>*9
            method 3
            density {
             cylindrical
             density_map {
              [0 rgb 0]
              [0.5 rgb <1,1,1>]
              [1 rgb <3,3,3>]
             }
             scale W
             Point_At_Trans(B)
            }
        }
    }
}


Post a reply to this message

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