//
// PoVRay 3.1 Scene File "palms.pov"
// created by Friedrich A. Lohmueller, 2000
// Original Palm head algorith by
// By Tsutomu HIGO 1998,
// E-mail: nj2t-hg_at_asahi-net.or.jp
// Gallery: www.asahi-net.or.jp/~nj2t-hg/
#include "colors.inc"
#include "textures.inc"
// 600x600+aa about 3h with a 400 MHz PII without caustics
// camera -------------------------------------------------------------------------
#declare Cam0Position = <0.0 , 1 ,-3.5>;
#declare Cam0 = camera {//ultra_wide_angle
angle 95
location Cam0Position
up y right x
look_at < 0.3 , 2.35 , 0.0>}
camera{Cam0}
light_source{Cam0Position color White*0.3}
// sun -----------------------------------------------------------------------------
light_source{<1500,2500,-2500> color White*0.85}
// sky -----------------------------------------------------------------------------
plane{<0,1,0>,1 hollow //attention: hold sun lower than sky
texture{pigment{Bright_Blue_Sky quick_color Blue translate<10,0,30>}
finish {ambient 1 diffuse 0} }
scale 10000}
fog{fog_type 2 distance 50 color White
fog_offset 0.1 fog_alt 1.5 turbulence 0.8}
// ground pigment ------------ -----------------------------------------------------
#declare P_Ground =
pigment{granite turbulence 0.5 scale 0.2
color_map{[0.0 color MediumSeaGreen]
[0.2 color MediumForestGreen]
[0.4 color YellowGreen]
[1.0 color Green]} scale 0.5}
//----------------------------------------------------------------------------------
union{
plane{<0,1,0>, 0}
// put your own mountain in the background !
// height_field{tga "MountLo1.tga" smooth // inverse //...2.tga/3.tga/4.tga
// translate<-0.5,-0.001,0> scale<100,10,100>*0.5
// rotate<0,0,0> translate<35,0,50>}
texture{ pigment{P_Ground quick_color YellowGreen}
normal {bumps 0.25 scale 0.002}
finish {ambient 0.45 diffuse 0.55}}}
//----------------------------------------------------------------------------------
#declare Palm_Material =
material{
texture{pigment{color rgb<0.7,1.0,0.1>}
normal {bumps 0.25 scale <1,0.002,0.5>}
finish { ambient 0.4 diffuse 0.5 reflection 0.1 phong 0.7 }
}//--------
// interior{ caustics 0.2} // slows rendering down!!! use only by detailed view!
}
// tried a simpler kind of leaf finger
#declare Oleaf = sphere { <1, 0, 1.732> 2.01
clipped_by{sphere {<1,0,-1.732>,2 scale<1,0.03,0.5> }}
} //-------------------
#declare Random1 = seed (1021); //added some random in the leaf finger positions
#declare Random2 = seed (1022);
#declare Random3 = seed (1023);
#macro Palm_Head(Number_of_arms) // basical algorithm by Tsutomu Higo
union{
#local Sc=5;
#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>}
object { Oleaf scale Sc*
rotate z*Ct/Cto*60-3*(0.5-rand(Random3))}
object { Oleaf translate x*-2 scale Sc*
rotate z*-Ct/Cto*50-3*(0.5-rand(Random3))}
scale<0.75,1,1>
rotate translate
}// end of union
#local Xp =Xp+sin(Xr*pi/180)*sin(Yr*pi/180);
#local Yp =Yp+cos(Xr*pi/180);
#local Zp =Zp+sin(Xr*pi/180)*cos(Yr*pi/180);
#local Ct = Ct+1; #end
#local Cn = Cn+1; #end
scale 0.05
material{Palm_Material}
}#end // end of Palm_Head
//----------------------------------------------
#macro Palme(SegH, 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>,0.11 }
cone{<0,2*SegH/3,0>,0.05,<0,SegH+0.001,0>,0.11 }
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(Random1));
#local ScaleT = (0.5+0.15*cos(pi*High/(Palm_Height)));
object{Segment
scale *SegScale
rotate<20*(0.5-rand(Random2)),80*(0.5-rand(Random3)),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 rotate<5*(0.5-rand(Random2)),80*(0.5-rand(Random3)),0>
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.10, 1, 13) rotate<0, 0, 0> translate<-0.20,0,0>}
object{Palme (0.10, 3, 15) rotate<0,120, -5> translate< 0.10,0,0>}
object{Palme (0.10, 2.2, 10) scale 0.9 rotate<0,200,-20> translate< 0.45,0,0>}
object{Palme (0.10, 0.5, 10) scale 0.4 rotate<0,-90, 0>rotate<-20,0,0> translate<-0.30,0,-0.50>}
// ---------------------- eof