|
|
Wasn't it Mike Williams who wrote:
>I managed to create a procedural version that has the black grout lines
>between the tiles. The "scale 1.0472" was determined by trial and error,
>looking at a region 5000 units away from the origin to magnify the
>discrepancies. I guess that 1.0472 should really be some expression
>containing things like pi and sin(pi/3), but I can't work it out.
The source (with the "1.0472" to which I was referring) looks like this:
#version 3.6;
global_settings {assumed_gamma 1.0}
camera {location <0,20,-30> look_at <0,0,0> angle 40}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}
// ----------------------------------------
#include "colors.inc"
#include "stones.inc"
#include "functions.inc"
#declare T1 = texture {T_Stone20 scale 5} // Texture for hexagons
#declare T2 = texture {T_Stone17 scale 2} // texture for triangle centre
#declare T3 = texture {pigment {rgb 0}} // texture for grout
// combined triangle and grout
#declare T4 = texture {function {f_hex_y(x,z,y,0)}
texture_map {[0.03 T3][0.03 T2]}
rotate y*30
scale 1.0472
}
#declare S=sin(pi*1/3);
#declare C=cos(pi*1/3);
plane {y,0
texture {function {(sin(x-pi/2) * sin(x*C+z*S) * sin(x*C-z*S))/2}
texture_map { [0.5 T1][0.5 T4] }
}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|