|
![](/i/fill.gif) |
It's easier to do with pov3.5 than the answers already given may make you
think:
// Create a pattern function which is tileable inside <0,0,0>-<1,1,0>
#macro MakeXYTileablePatternFunc(PatternFunc)
function
{ (PatternFunc(x,y,z)*(1-x)+PatternFunc(x-1,y,z)*x)*(1-y) +
(PatternFunc(x,y-1,z)*(1-x)+PatternFunc(x-1,y-1,z)*x)*y
}
#end
// Example:
// -------
#declare GranitePattern = function { pattern { granite noise_generator 1 } }
#declare TileableGranite = MakeXYTileablePatternFunc(GranitePattern)
#declare Tile =
box
{ 0,<1,1,.1>
pigment
{ function { TileableGranite(x,y,z) }
color_map { [0 rgb z][1 rgb 1] }
}
}
// Create 4x4 boxes:
#declare IndY = -2;
#while(IndY < 2)
#declare IndX = -2;
#while(IndX < 2)
object { Tile translate <IndX, IndY, 0> }
#declare IndX = IndX+1;
#end
#declare IndY = IndY+1;
#end
camera { location -z*9 look_at 0 angle 35 }
light_source { -z*100, 1 }
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |