rendered paste body#include "colors.inc"
#include "textures.inc"
#declare R = seed(4321567890);
light_source {
<30, 30, -100> color White
}
camera {
location <0, 100, 0.5>
look_at <0,0,0>
}
plane { y, 0
pigment {
checker color Black color White
}
//finish { reflection 0.5 }
}
#macro makebranches( startx, starty, startz, wide )
#local N = 0;
#while( N < 3 )
#local randx = rand(R);
#local randy = rand(R);
#local randz = rand(R);
#if( randx > 0.5 )
#declare randx = (randx-0.5)*2;
#else
#declare randx = randx*-2;
#end
#if( randz > 0.5 )
#declare randz = (randz-0.5)*2;
#else
#declare randz = randz*-2;
#end
cylinder {
<startx, starty, startz>,
<20*randx, 20*randy, 20*randz>,
0.8*wide
pigment {
color Blue
}
finish {
phong 1
}
}
#if( 5*randx < 25 )
makebranches( 5*randx, 5*randy, 5*randz, 0.8*wide )
#end
#local N=N+1;
#end
#end
cylinder {
<0,-1,0>,
<0, 20,0>,
2
pigment {
color Red
}
finish {
phong 1
}
}
makebranches( 0, 14, 0, 1 )
/*
cylinder {
<5, 20, 5>,
<0, 14, 0>,
0.7
pigment {
color Red
}
finish {
phong 1
}
}
cylinder {
<4, 20,-5>,
<0, 14, 0>,
0.7
pigment {
color Red
}
finish {
phong 1
}
}
cylinder {
<-5, 20,0>,
<0, 14, 0>,
0.7
pigment {
color Red
}
finish {
phong 1
}
}
*/