|
![](/i/fill.gif) |
"Trevor G Quayle" <Tin### [at] hotmail com> wrote:
> The 1/7 value is the grout width value. The tile is 6/7 units and the grout is
> 1/7 units.
>
> Use declare and math to adust tile/grout sizes:
>
> #declare TilSiz= <xdim,ydim,0>; //tile offsetting (tile size plus grout line)
> #declare GrtSiz= gwid; //grout width
>
> texture {
> pigment { uv_mapping
> gradient x
> pigment_map{
> [GrtSiz/(TilSiz.x+GrtSiz) rgb 1]
> [GrtSiz/(TilSiz.x+GrtSiz) gradient y
> colour_map{
> [GrtSiz/(TilSiz.y+GrtSiz) rgb 1]
> [GrtSiz/(TilSiz.y+GrtSiz) rgb <.6,.6,1> ]
> }
> ]
> }
> scale TilSiz
> }
> finish { basic_finish }
> }
>
> This way you can make the tiles bigger (change TilSiz) without changing the
> grout size, or vice versa.
>
> -tgq
when you said "The 1/7 value is the grout width value." , a light sort of went
on ... but there is y grout and and x grout.
the math for the correct y-grout-[scale] due to y-scaling is ... ? puzzling
".5" value which I guessed at, since it looked 2 times too big.
In the real Lego world this is what worked:
#declare TilSiz= <6/7,12/7,1>; //tile offsetting (tile size plus grout line)
#declare GrtSiz= 1/7; //grout width
//0.142857
echof(GrtSiz/(TilSiz.x+GrtSiz)) // 0.14286
cr()
echof(GrtSiz/(TilSiz.y+GrtSiz)) // 0.07143
cr()
#declare tileplaid =
#if (10)
texture {
pigment { uv_mapping
gradient x
pigment_map{
[GrtSiz/(TilSiz.x+GrtSiz) rgb 1]
[GrtSiz/(TilSiz.x+GrtSiz) gradient y
colour_map{
[GrtSiz/(TilSiz.y+GrtSiz) rgb 1]
[GrtSiz/(TilSiz.y+GrtSiz) rgb <.6,.6,1> ]
}
]
}
//scale TilSiz*.01
scale <1/160,1/20,1>*.7
}
finish { basic_finish }
}
#else
texture {
pigment { uv_mapping
gradient x
pigment_map{
[1/7 rgb 1]
[1/7 gradient y
colour_map{
[(1/7)*.5 rgb 1]
[(1/7)*.5 rgb <.6,.6,1> ]
}
]
}
scale <1/160,1/20,1>*.7 // == 0.00625 / .05 = 0.125 1/8
}
finish { basic_finish }
} #end
still had to scale by something else not TilSiz
scale by TilSiz = a grout line half the pool's width and tiles with a greater
xdim
Post a reply to this message
Attachments:
Download 'lego_pool2.png' (169 KB)
Preview of image 'lego_pool2.png'
![lego_pool2.png](/povray.binaries.images/attachment/%3Cweb.494d61676655db18b4cbed3d0%40news.povray.org%3E/lego_pool2.png?preview=1)
|
![](/i/fill.gif) |