Here is the code to generate with Pov Ray a greek coloumn kernel.
#version 3.6; // 3.7;
global_settings{ assumed_gamma 2.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_0 = camera {/*ultra_wide_angle*/ angle 75 // front view
location <0.0 , 1.0 ,-3.0>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
#declare Camera_1 = camera {/*ultra_wide_angle*/ angle 90 // diagonal view
location <2.0 , 2.5 ,-3.0>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
#declare Camera_2 = camera {/*ultra_wide_angle*/ angle 90 // right side view
location <3.0 , 1.0 , 0.0>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
#declare Camera_3 = camera {/*ultra_wide_angle*/ angle 90 // top view
location <0.0 , 3.0 ,-0.001>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
camera{Camera_0}
// sole-------------------------------------------------------------------
light_source{<-1500,2500,-2500> color White}
// cielo ---------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
color_map { [0.00 rgb <1.0,1.0,1.0>]
[0.30 rgb <0.0,0.15,1.0>]
[0.70 rgb <0.0,0.15,1.0>]
[1.00 rgb <1.0,1.0,1.0>]
}
scale 2
} // end of pigment
} //end of skysphere
// nebbia ---------------------------------------------------------------------
fog{fog_type 2
distance 50
color White
fog_offset 0.1
fog_alt 2.0
turbulence 0.8}
// terreno ------------------------------------------------------------------
plane{ <0,1,0>, 0
texture{ pigment{ color rgb <0.825,0.65,0.35>}
normal { bumps 0.95 scale 0.025 }
finish { phong 0.1 }
} // end of texture
} // end of plane
//--------------------------------------------------------------------------
//---------------------------- oggetti in scena ----------------------------
//--------------------------------------------------------------------------
// ------------------------------------------------------------- Nocciolo di colonna spezzata
// ---------------------------------------------------- "Macro Colonna_01( )
#macro Nocciolo_colonna_01 ( Nocciolo_colonna_altezza__, //
Colonna_suddivisione__, //
C_Raggio_base__,
C_Raggio_punta__
) //---------------------------------
//------------------------------------------------------------------------------------
#local Taglia_punta_r__ = 2*pi*C_Raggio_punta__ /Colonna_suddivisione__*1/sqrt(2);
#local Taglia_base_r__ = 2*pi*C_Raggio_base__/Colonna_suddivisione__*1/sqrt(2);
#local Taglia_punta_distanza__ = C_Raggio_punta__ +Taglia_punta_r__ *1/sqrt(2);
#local Taglia_base_distanza__= C_Raggio_base__ +Taglia_base_r__*1/sqrt(2);
#local R_fine_ = +Taglia_base_r__*0.1;
// -----------------------------------------------------------------------------------
difference{ // nocciolo della colonna
cone { <0,0,0>,C_Raggio_base__,<0,Nocciolo_colonna_altezza__,0>,C_Raggio_punta__
} // end of cone -----------------------------------
#local Nr = 0; // start
#local Fine_nr = Colonna_suddivisione__; // end
#while (Nr< Fine_nr)
cone{ <Taglia_base_distanza__,-R_fine_, 0>, Taglia_base_r__,
<Taglia_punta_distanza__ , Nocciolo_colonna_altezza__ + R_fine_,0>, Taglia_punta_r__
rotate<0,Nr * 360/Fine_nr,0>
} // fine del cono -----------------------------------
#local Nr = Nr + 1; // prossimo Nr
#end // --------------- fine del ciclo
} // fine differenza
#end //------------------------------------------------------------------ fine della macro
//------------------------------------------------------------------------------------
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
#declare Trama_pietra = // Trama in pietra del nocciolo di colonna
texture { T_Grnt12
normal { agate 0.35 scale 0.05}
finish { phong 0.2 }
scale 1
} // fine della trama
#declare Trama_nocciolo_colonna = // suddivisioni verticali
texture { gradient<0,1,0> scale <1,0.67,1> turbulence 0.01
texture_map{ [0.00 Trama_pietra ]
[0.001 pigment{ color rgb <1,1,1>*0.1} ]
[0.005 pigment{ color rgb <1,1,1>*0.1} ]
[0.006 Trama_pietra ]
[1.00 Trama_pietra ]
} // end of texture_map
} // end of texture ------------------------------------
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
object{ Nocciolo_colonna_01 ( 2.5, // Column_Total_Height, //
32, // Column_Subdivision, // intero ~ 16
0.35, // Column_Base_Radius,
0.20 // Column_Top_Radius,
) //---------------------------------
texture { Trama_nocciolo_colonna}
scale<1,1,1> rotate< 0,0,0> translate<0,0,0>
} // fine di "Colonna_01(...) ---------------------------------------
//------------------------------------------------------------------- end
The resultant picture generated by the code written above.
Nessun commento:
Posta un commento