|
|
Heres a little macro that should give you a head start. Obviously the
shingle colors are random and you'll want to stick a proper texture in
there. Also I havn't changed the height of each shingles only the width.
#include "colors.inc"
#include "textures.inc"
#include "functions.inc"
#include "shapes.inc"
camera { location <10,0,-40> look_at <10,0,0> }
background { Blue }
light_source { <900, 560, -500> color White }
light_source { <-900, -560, -500> color White }
light_source { <900, 560, 500> color White }
light_source { <-900, -560, 500> color White }
#declare rStream = seed(0);
#macro
RowOfShingles(heightOfShingle,widthOfShingle,depthOfShingle,lengthOfRow)
#declare currentLength = 0;
#declare gapBetweenShingles = 0.1;
union {
#while(currentLength < lengthOfRow)
#declare thisShingleWidth = widthOfShingle +
(rand(rStream)*(widthOfShingle/2));
box {
<currentLength,0,0>,
<currentLength+thisShingleWidth,heightOfShingle,depthOfShingle>
texture {
pigment {
rgb
<rand(rStream),rand(rStream),rand(rStream)>
}
}
}
#declare currentLength = currentLength +
thisShingleWidth + gapBetweenShingles;
#end
}
#end
object {
RowOfShingles(3,2,0.5,40)
}
Post a reply to this message
|
|