Here we show how to create a simple picture of a dust whirpool, using the scattering media materials generated by POV Ray.
#version 3.7;
global_settings{assumed_gamma 1.0}
#default{ finish{ ambient 0.1 diffuse 0.9 }}
//--------------------------------------------------------------------------
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
#include "golds.inc"
#include "stones.inc"
#include "woods.inc"
#include "shapes.inc"
#include "shapes2.inc"
#include "functions.inc"
#include "math.inc"
#include "transforms.inc"
//-------------------------------------------------------------------------------------------------------<<<<
//-------------------------------------------------------------------------------------------------------<<<<
// camera ------------------------------------------------------------------
#declare CAmera_posizione = < 0.00, 1.70,-5.50>; // vista frontale
#declare Camera_guarda_a = < 0.00, 3.2, 0.00>;
#declare CAmera_angolo = 55 ; // in gradi
//--------------------------------------------------------------------------------------------------------<<<<
camera{ /*ultra_wide_angle*/
location CAmera_posizione
right x*image_width/image_height
angle CAmera_angolo
look_at Camera_guarda_a
}
//------------------------------------------------------------------------------------------------------<<<<<
//------------------------------------------------------------------------------------------------------<<<<<
// sole ---------------------------------------------------------------------
light_source{<1500,2500,-2500> color White*0.85}
// cielo ---------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
color_map { [0.00 rgb <1.0,1.0,1.0>*0.5]
[0.30 rgb <0.4,0.4,1.0>*0.5]
[0.75 rgb <0.4,0.4,1.0>*0.5]
[1.00 rgb <1.0,1.0,1.0>*0.5]
}
scale 3
}
} //fine del cielo
// nebbia ---------------------------------------------------------------------
fog{fog_type 2
distance 50
color White*0.5
fog_offset 0.1
fog_alt 2.0
turbulence 0.8}
// terreno ------------------------------------------------------------------
plane{ <0,1,0>, 0
texture{ pigment{ color rgb <1.00,0.95,0.85>*0.5}
normal { bumps 0.95 scale 0.025 }
finish { phong 0.1 }
} //fine della trama
} // fine del piano
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//---------------------------- oggetto in scena ----------------------------
//--------------------------------------------------------------------------
// oggetto di diffusione della luce "tornado di polvere"
cylinder{ <0,0,0>,<0,100,0>,1.5
pigment { rgbt 1 }
hollow
interior{ //---------------------
media{ scattering{ 1, <1,1,1>
extinction 2.5 }
absorption rgb< 0.65, 0.89, 0.89>*2
// densità 1
density{ spiral2 8
turbulence 0.25
color_map {
[0.00 rgb 0.00] // bordo
[0.50 rgb 0.20] //
[1.00 rgb 1.00] // centro
} // fine della color_map
rotate<90,0,0>
scale<1,0.5,1>
} // fine della densità 1
// densità 2
density{ cylindrical
turbulence 1.5
frequency 1
color_map {
[0.00 rgb 0.00] // bordo
[0.50 rgb 0.25] //
[0.85 rgb 1.00] //
[1.00 rgb 0.50] // centro
} // end color_map
scale<1,1,1>
} // fine della densità 2
}
} // fine dell'interior
rotate<0,0,-25>
translate < 0.00, 0.15, 0.5>
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
Here is the picture generated by the code:
Nessun commento:
Posta un commento