POV-Ray : Newsgroups : povray.binaries.images : A quick img : Re: A quick img Server Time
15 Aug 2024 22:28:10 EDT (-0400)
  Re: A quick img  
From: Coridon Henshaw
Date: 19 Apr 2002 16:05:52
Message: <Xns91F5A3C11C029csbhccse@204.213.191.226>
"Sam Van Oort" <sam### [at] yahoocom> wrote in
news:3cc06290$1@news.povray.org: 

> The "searchlight" is actually supposed to be a laser, but I'm too lazy to
> tinker with media.  If anyone has a shortcut, be my guest.

Generic glowing sci-fi 'laser':

#macro BeamWeapon (Source, Bearing, Range, Radius, CenterColor, SideColor)
#local SourceRadius = Radius * 2;
sphere
{
    0,1
    pigment {rgbt 1}
    hollow

    interior
    {
        media
        {
            intervals 1
            method 3
            emission 1.75/Radius

            density
            {
                spherical
                color_map
                {
                    [0 color rgb <0,0,0>]
                    [.125 color SideColor]
                    [1 color CenterColor]
                }
            }
        }
        media
        {
            intervals 1
            method 3
            absorption .25/Radius

            density
            {
                cylindrical
                color_map
                {
                    [0 color rgb <0,0,0>]
                    [.125 color NegateVector (SideColor)]
                    [1 color NegateVector (CenterColor)]
                }
            }
        }
    }
    scale SourceRadius
    translate Source
}

cylinder
{
    <0,0,0> <0,1,0>, 1

    pigment {rgbt 1}
    hollow

    interior
    {
        media
        {
            intervals 1
            method 3
            emission 1.75/Radius

            density
            {
                cylindrical
                color_map
                {
                    [0 color rgb <0,0,0>]
                    [.125 color SideColor]
                    [1 color CenterColor]
                }
            }
        }

        media
        {
            intervals 1
            method 3
            absorption .275/Radius

            density
            {
                cylindrical
                color_map
                {
                    [0 color rgb <0,0,0>]
                    [.125 color NegateVector (SideColor)]
                    [1 color NegateVector (CenterColor*2)]
                }
            }
        }
    }
    rotate x*90
    scale <Radius, Radius, Range>
    rotate Bearing

    translate Source
}
#end


Post a reply to this message

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