![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
/*
On Tue, 06 Apr 1999 19:29:49 -0400, Anthony Bennett
<ben### [at] panama phoenix net> wrote:
>Wouldn't it just be easier and faster to have a predetermined pigment like
>that? If not, then bring on the macro!
No sooner said than done (I had already been working on it.) Just
paste this whole article into POV and render. Scale is a little
funky--the hexes are one unit from point to point. That makes the
calculation of mortar thickness a little tricky but not impossible.
Just divide the thickness you want by .866 and subtract from 1 to
get the cutoff to use in the color_map.
Indentation is ignored for the sake of compactness. Either that or
Tyler Syndrome is contagious.
*/
#macro HexTiles( Map )
#local hexGrad=pigment { gradient x
color_map {Map} scale sqrt(3)/2+.0001}
#local hexBlock=pigment { radial pigment_map{
#local i=0; #while (i<6)
[i/6 hexGrad rotate (30+60*i)*y]
[(i+1)/6 hexGrad rotate (30+60*i)*y]
#local i=i+1; #end}}
radial pigment_map {
[0/3 hexBlock translate <.5,0,-sqrt(3)/2>]
[1/3 hexBlock translate <.5,0,-sqrt(3)/2>]
[1/3 hexBlock translate <-1,0,0>]
[2/3 hexBlock translate <-1,0,0>]
[2/3 hexBlock translate <.5,0,sqrt(3)/2>]
[3/3 hexBlock translate <.5,0,sqrt(3)/2>]
}
translate x
warp {repeat 1.5*x flip x}
warp {repeat .5*sqrt(3)*z flip z}
scale .5
#end
plane { y,0
pigment {HexTiles(color_map{[.95 red .7] [.95 rgb 1]})}
}
camera { location 12*y sky z look_at 0 }
light_source { 6*y rgb 1}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ronald L. Parker wrote:
> Indentation is ignored for the sake of compactness.
As it should be in all cases.
> Either that or Tyler Syndrome is contagious.
I can only hope.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
(I hope you can read spanish.)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Wed, 07 Apr 1999 02:41:24 GMT, Ronald L. Parker <par### [at] mail fwi com> wrote:
>No sooner said than done (I had already been working on it.) Just
>paste this whole article into POV and render. Scale is a little
>funky--the hexes are one unit from point to point. That makes the
>calculation of mortar thickness a little tricky but not impossible.
>Just divide the thickness you want by .866 and subtract from 1 to
>get the cutoff to use in the color_map.
Just a side note... if you remove the 'scale .5' at the end, the
pattern coincides perfectly with the 'hexagons' pigment type, so
you can use transparency in your color map to see through to some
nice pigment-mapped stone hexagons. Of course, none of this is
actually germane to povray.programming, except in that it's saved
us from having to do any programming on POV. :)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ken <tyl### [at] pacbell net> wrote:
:> Indentation is ignored for the sake of compactness.
: As it should be in all cases.
If I stop using indentation in my pov code, will you help me to debug the
code next year, when I want to fix it or convert it to the new povray?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Can this pigment be used as a normal?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Wed, 07 Apr 1999 20:53:20 -0400, Anthony Bennett wrote:
>Can this pigment be used as a normal?
You'll have to do some rewriting here and there, since the words 'pigment'
and 'pigment_map' are scattered liberally throughout, but all of the math
would remain the same.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Ronald L. Parker" wrote:...
Well done!. Playing with the macro I discovered that it works as well if
// [0/3 hexBlock translate <.5,0,-sqrt(3)/2>]
[1/3 hexBlock translate <.5,0,-sqrt(3)/2>]
[1/3 hexBlock translate <-1,0,0>]
[2/3 hexBlock translate <-1,0,0>]
[2/3 hexBlock translate <.5,0,sqrt(3)/2>]
// [3/3 hexBlock translate <.5,0,sqrt(3)/2>]
Alberto
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 08 Apr 1999 22:59:31 -0400, Alberto Mendoza <jac### [at] usb ve> wrote:
>
>
>"Ronald L. Parker" wrote:...
>
>Well done!. Playing with the macro I discovered that it works as well if
>
>// [0/3 hexBlock translate <.5,0,-sqrt(3)/2>]
> [1/3 hexBlock translate <.5,0,-sqrt(3)/2>]
> [1/3 hexBlock translate <-1,0,0>]
> [2/3 hexBlock translate <-1,0,0>]
> [2/3 hexBlock translate <.5,0,sqrt(3)/2>]
>// [3/3 hexBlock translate <.5,0,sqrt(3)/2>]
>
>Alberto
Good point. You can also replace those four remaining lines with
#local i=1; #while (i<=2)
[i/3 hexBlock translate vrotate(x,(120*i-60)*y)]
[i/3 hexBlock translate vrotate(x,(120*i+60)*y)]
#local i=i+1; #end
The only advantage to this is that it might make the .5's and sqrt(3)'s a
little less cryptic and/or intimidating.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ron Parker wrote:
>...You can also replace those four remaining lines with
>
> #local i=1; #while (i<=2)
> [i/3 hexBlock translate vrotate(x,(120*i-60)*y)]
> [i/3 hexBlock translate vrotate(x,(120*i+60)*y)]
> #local i=i+1; #end
>
> The only advantage to this is that it might make the .5's and sqrt(3)'s a
> little less cryptic and/or intimidating.
and the symmetries become more apparent.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |