//
// PoVRay 3.1 Scene File "palm2.pov"
// created by Friedrich A. Lohmüller, 2000
#include "colors.inc"
#include "textures.inc"
global_settings { max_trace_level 10 }//
#declare Cam0Position = < 0 ,1.20 ,-6.0>;
#declare Cam0=camera {ultra_wide_angle angle 77
//angle 72
right x up y//*4/3
location Cam0Position look_at <-0.2, 1.18 ,0>}
camera{Cam0 }
light_source{Cam0Position color <1.0,0.98,0.8>*0.35}
// flashlight at camera position ---
// sun --------------------------------------------------------------
light_source{<-2000,2500,-2400> color White *1}
//-------------------------------------------------------------------
#declare Fog_ON = 1; // Fog on
//-------------------------------------------------------------------
// sky --------------------------------------------------------------
// sky -----------------------------------------------------------------------------
plane{<0,1,0>,1 hollow //attention: hold sun lower than sky
texture{pigment{Bright_Blue_Sky quick_color Blue scale 3.5 translate<8,0,10>}
finish {ambient 1 diffuse 0} }
scale 10000}
#if (Fog_ON = 1)
fog{fog_type 2 distance 45 color rgb<1,0.98,0.8>
fog_offset 0.1 fog_alt 1.0 turbulence 0.2}
#end
//--------------------------------------------------------------------------
// ground
plane{<0,1,0>, 0
texture{pigment{color YellowGreen}
normal {bumps 0.3 scale 0.015}
finish {ambient 0.35 diffuse 0.55 phong 0.1}}
}
//----------------------------------------------------------------------------------
#declare Palm_Material =
material{
texture{//pigment{color rgbf<0.7,1.0,0.1,0.3>}
pigment{color rgb<0.7,1.0,0.1>}
normal {bumps 0.25 scale <1,0.5,0.002>}
finish { ambient 0.4 diffuse 0.5 reflection 0.1 phong 0.7 }
}//--------
// interior{ caustics 0.2}
}
#declare Oleaf = sphere { <1, 0, 1.732> 2.01
clipped_by{sphere {<1,0,-1.732>,2 scale<1,0.03,0.5> }}
scale<1,1.35,1>} //-------------------
//#declare Zufall0 = seed (1000);
#declare Zufall1 = seed (1021);
#declare Zufall2 = seed (1022);
#declare Zufall3 = seed (1023);
#macro Palm_Head(Number_of_arms)
union{
#local Cno =Number_of_arms;
#local Cn =0;
#while (Cn ,<0,1.05,0>, 0.3*(1-Ct/Cto)+0.05 scale<0.7,0.9,0.4>}
#if ( Ct/2 = int(Ct/2) )
object { Oleaf scale ScFactor*
rotate z*Ct/Cto*50 -3*(0.5-rand(Zufall3)) }
#else
object { Oleaf scale<-1,1,1>
scale ScFactor*
rotate z*-Ct/Cto*50 -3*(0.5-rand(Zufall3)) }
#end
scale 1.5*<0.75,1,1>*(1+Cn*0.015) //increases scale for last
rotate translate
}// end of union
#local Xp =Xp+sin(Xrot*pi/180)*sin(Yrot*pi/180);
#local Yp =Yp+cos(Xrot*pi/180) ;
#local Zp =Zp+sin(Xrot*pi/180)*cos(Yrot*pi/180);
#local Ct = Ct+1; #end
#local Cn = Cn+1; #end
scale 0.035
material{Palm_Material}
}#end // end of Palm_Head
//----------------------------------------------
#macro Palme(SegD, Height, Nr_of_arms)
#local SegH = 0.10;
#local SegScale = 1+Height/10; // scale of the segments depending from Height!
#local EndNr = int(Height/SegH); // end
#local Palm_Height = EndNr*SegH;
#local Segment =
difference{
cone{<0,-0.05,0>,0.05,<0,SegH ,0>,SegD }
cone{<0,2*SegH/3,0>,0.05,<0,SegH+0.001,0>,SegD }
scale <1,1,1> rotate<0,0,0> translate<0,0,0>
texture{pigment{color LightWood}
normal {bumps 1.0 scale<0.005,0.2,0.005>}
finish {ambient 0.45 diffuse 0.55 phong 0.1}}}
#local High = 0;
#local Nr = 0; // start
union{
#while (Nr< EndNr)
#local ScaleY = (1-0.15*rand(Zufall1));
#local ScaleT = (0.5+0.15*cos(pi*High/(Palm_Height)));
object{Segment
scale *SegScale
rotate<20*(0.5-rand(Zufall2)),80*(0.5-rand(Zufall3)),0>
translate<7/EndNr*(-0.15+0.15*cos(pi*High/(1.2*Palm_Height)))
,High,0>}
#local High= High+0.1*ScaleY*SegScale;
#local Nr = Nr + 1; // next Nr
#if (Nr = EndNr)
object{Palm_Head(Nr_of_arms)
scale 1+Height/7
translate<7/EndNr*(-0.15+0.15*cos(pi*High/(1.2*Palm_Height))) ,High,0>}
#end
#end // --------------- end of loop
}// end of union
#end // of Palme macro ----------
object{Palme (0.20, 1.0, 14) rotate<0,0,0> translate<0,0,0>}