|
|
Howdy everyone. Here is the promised recursion macro code. I only
indented the macro part, so please no flames about my hardtoreadcode.
Plus, when you go to paste this code into your scene, it will need to be
edited due to normal pasting problems. Have fun, and don't hurt
yourselves!
//***********CODE***********
//Recursion macro
//1999 Samuel Benge STB### [at] aolcom
//Altered from pyrimid.pov by Chris Young
global_settings{ ambient_light 0 }
camera{ location<0,2,-8> look_at<0,0,0> rotate y*-0 angle 40}
light_source{ <100,200,-50>,1 spotlight point_at 0 radius 0 falloff 1 }
light_source{ <-200,200,-50>,<.2 .3 .4> shadowless }
//Ground
plane{y,-1 pigment{rgb<1 1 .8>} normal{granite 1.5 scale 2.5} hollow}
//Fog
fog{rgb<.5 .5 .6> distance 100 fog_type 2 fog_alt 5 fog_offset 0}
//The macro
#macro Curser(X,Y,Z,R,L)
sphere { <0,1,0>,(.75/4) }
cone{<0,0,0>,(1/4),<0,1,0>,(.75/4) }
#if (L > 0)
#local New_L = L - 1;
#local New_R = R / 2;
#local Co=0;#local Co=Co+1/L;
union{
union{
Curser(X,Y,Z,New_R,New_L)
scale .75
rotate y*40
rotate z*30
translate y*1
}
union{
Curser(X,Y,Z,New_R,New_L)
scale .75
rotate y*40
rotate z*-30
translate y*1
}
pigment{rgb<.4+Co .5+Co 1+Co*2>}
}
#end
#end
union{
Curser(0,0,0,1,9)
translate y*-2
}
Post a reply to this message
|
|