POV-Ray : Newsgroups : povray.text.scene-files : Code for the Missile image posted Server Time
31 Oct 2024 16:17:15 EDT (-0400)
  Code for the Missile image posted (Message 1 to 1 of 1)  
From: POVMAN
Subject: Code for the Missile image posted
Date: 12 May 2006 03:30:03
Message: <4464397b@news.povray.org>
#include "colors.inc"
#include "glass.inc"
#include "stars.inc"
#include "shapes.inc"
#include "functions.inc"

#declare showFire = true;
#declare showSmoke = true;
camera {

//  location  <0,0,-25>
//  look_at   <10, -3,  0>

  location  <-40,-25,-25>
  look_at   <0, -3,  0>

//  location  <0,20,-1>
//  look_at   <0, 0,  0>

}
global_settings {max_trace_level 12 }
light_source  {
  <-500, 2000, -500>
  color White
  //area_light <50,0,0>,<0,0,50> 3,3
  //jitter
  //adaptive 1
  media_interaction on
  media_attenuation on
  }


background { color <0.25,0.35,0.80> }

light_group {

union   {
        // sensor
        box     {
                <0, .2 , .2>,
                <-.1, -.2, -.2>
                texture {
                        pigment {
                                leopard scale <20,.01,.01>
                                pigment_map     {
                                                [0 Orange*1.2]
                                                [.099 Orange*1.2]
                                                [.1 Black]
                                                [1 Black]
                                                }

                                }
                        finish  {
                                specular .1
                                roughness .001
                                ambient 0
                                }
                        }
                }
        // glass sphere
        sphere  {
                <0,0,0>,.4
                scale <.7,1,1>
                interior{
                        ior 1.4
                        }
                texture {
                        pigment {
                                //Clear
                                rgbt <0.858824,0.576471,0.439216,.9>
                                }
                        finish  {
                                specular .5
                                roughness .1
                                reflection      { 0..5 }
                                ambient 0
                                }
                        }
                }
        // missile body
        union   {
                cone    {
                        <0,0,0>,.5,
                        <3,0,0>,1
                        }
                cylinder{
                        <3,0,0>,
                        <9,0,0>,1
                        }
                cone    {
                        <9,0,0>,1,
                        <13.5,0,0>,1.4
                        }
                cylinder{
                        <13.5,0,0>,
                        <20,0,0>,1.4
                        }
                cone    {
                        <20,0,0>,1.4,
                        <21.5,0,0>,1
                        }
                #declare r1 = 0;
                #while(r1 < 4)
                        prism   {
                                linear_spline
                                0,.1,3,
                                <0,0>,<1,0>,<1,.8>
                                rotate <-90,0,0>
                                translate <4,1,0>
                                rotate <r1*90,0,0>
                                scale 1
                                }
                        #declare r1 = r1 + 1;
                #end
                #declare r1 = 0;
                #while(r1 < 4)
                        prism   {
                                linear_spline
                                0,.1,5,
                                <0,0>,<5,0>,<5.2,.8>,<4.9,1.8>,<2,1.8>
                                rotate <-90,0,0>
                                translate <14,1.4,0>
                                rotate <r1*90,0,0>
                                scale 1
                                }
                        #declare r1 = r1 + 1;
                #end
                texture {
                        pigment { White *1.5  }//*1.5
                        finish  {
                                specular .2
                                roughness 0.001
                                ambient 0
                                }
                        normal  {
                                bumps scale .0001
                                bump_size .01
                                }
                        }
                }
        translate <-21.5,0,0>
        rotate <30,0,0>
        }

#if(showSmoke = true)
// smoke oject
#declare pObject = union {
        cone    {
                <2,0,0>,0,
                <15,0,0>,2
                }
        cylinder{
                <15,0,0>,
                <1000,0,0>,2
                }
        };

//smoke trail
cylinder        {
                <2,0,0>
                <1000,0,0>,
                4
                hollow

        interior        {
                        media   {
                                intervals 5 //5  higher slows it up and 
gives smoother images
                                samples 5  //5 lower = more blocky
                                method 3
                                absorption 0.2
                                scattering      {
                                                1,color  Gray25
                                                extinction .4//1.2 //amount 
of above color subtracted as it passes through, darkens the cloud
                                                }
                                density {
                                        pigment_pattern { object {pObject}} 
// pattern of the media
                                        warp    { turbulence <.5,1,1> }
                                        color_map       {
                                                        [0 rgb 0]
                                                        [.45 rgb 0]
                                                        [.5 rgb 1]
                                                        [1 rgb 1]
                                                        }
                                        }
                                }
                        }
                texture { pigment { Clear } }
                }
#end


#if(showFire = true)
//jet exhaust
difference      {
                sphere  {
                        <0,0,0>,
                        1
                        }
                box     {
                        <0,4,4>,
                        <-4,-4,-4>
                        }
                hollow
                scale <40,2,2>
                interior        {
                                media  {
                                       intervals 5 //5  higher slows it up 
and gives smoother images
                                       samples 5 //5  lower = more blocky
                                       emission .3 //1    brightness of 
glowing media
                                       density  {
                                                spherical scale <50,3,3>
                                                warp    {
                                                        turbulence 
<.8,.07,.05>
                                                        }
                                                density_map     {
                                                                [0 rgb 0]
                                                                [.6 rgb 0]
                                                                [.7 color 
Yellow]
                                                                [.8 color 
Yellow]
                                                                [.9 color 
White]
                                                                [1 color 
White]
                                                                }
                                                }
                                        }
                                }

                texture {
                        pigment {
                                Clear
                                }
                        }
                }

//cloud scape
#end


light_source  {
  <0, -1000,0>
  color White*.1
  media_interaction off
  media_attenuation on
  }
global_lights on
}// end of light_group



union {
   plane {
      y, 260
      texture {
         finish {ambient 0 diffuse 0.7}
         pigment {
            bozo turbulence 1.00 translate 200*y
            color_map {
               [0.5, rgb 1 transmit 1.0]
               [1.0, rgb 1 transmit 0.6]
            }
            scale 0.125
         }
         scale 1500
      }
   }
   plane {y, 240}
   texture {
      finish {ambient 0 diffuse 0.7}
      pigment {
         bozo turbulence 0.35 translate 300*y
         color_map {
            [0.5, rgb 1 transmit 1.0]
            [0.8, rgb 1 transmit 0.5]
         }
         scale 10 warp {turbulence 0.7} scale 1/10
         scale 0.125
      }
      scale 2500
   }
   texture {
      finish {ambient 0 diffuse 0.5}
      pigment {
         bozo turbulence 0.35 translate 400*y
         color_map {
            [0.5, rgb 1 transmit 1.0]
            [0.8, rgb 1 transmit 0.4]
         }
         scale 10 warp {turbulence 0.7} scale 1/10
         scale 0.125
      }
      scale 2500
   }
   hollow double_illuminate
   //scale 1/200
   no_shadow
   translate <0,0,100>
   rotate <40,0,-20>
}


-- 
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/


Post a reply to this message

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