![](/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) |
I finally made my first patch in POV:
I added two patterns similar to the HEXAGON/CHECKER
one that fills the x-y plane with squares, alterning four "colours"
and another that fills the x-y plane with triangle, using six "colours".
From the mathematical point of view, I felt they were missing from the
very beginning
(at least since HEXAGON has been added).
The patch can be retrieved at:
http://www.altern.org/grimbert/pov/index.html
--
J. Grimbert
http://www.altern.org/grimbert/
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) |
J. Grimbert <jgr### [at] atos-group com> wrote:
: I finally made my first patch in POV:
: I added two patterns similar to the HEXAGON/CHECKER
: one that fills the x-y plane with squares, alterning four "colours"
At least this one is easy to achieve without needing to patch povray.
Something like:
#macro SquarePattern(pigm1,pigm2,pigm3,pigm4)
#local Row1=
pigment
{ gradient x pigment_map
{ [0 pigm1]
[.5 pigm1]
[.5 pigm2]
[1 pigm2]
}
}
#local Row2=
pigment
{ gradient x pigment_map
{ [0 pigm3]
[.5 pigm3]
[.5 pigm4]
[1 pigm4]
}
}
gradient y pigment_map
{ [0 Row1]
[.5 Row1]
[.5 Row2]
[1 Row2]
}
scale 2
#end
#declare P1=pigment { rgb z }
#declare P2=pigment { marble turbulence .5 scale .3 }
#declare P3=pigment { granite scale .2 }
#declare P4=pigment { rgb y }
camera { location -z*5 look_at 0 }
plane
{ -z,0
pigment { SquarePattern(P1,P2,P3,P4) translate -10 }
finish { ambient 1 }
}
My motto is: Why do something with an external program or patching
povray, if you can do it with povray itself without noticeable performance
loss?
: and another that fills the x-y plane with triangle, using six "colours".
This one is not as trivial as the previous one, but I'm sure it's also
possible with pigment_maps.
--
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) |
On 30 Aug 1999 11:18:50 -0400, Nieminen Juha wrote:
>: and another that fills the x-y plane with triangle, using six "colours".
>
> This one is not as trivial as the previous one, but I'm sure it's also
>possible with pigment_maps.
Here's one implementation, derived from my previous hexagons-with-mortar
pattern:
#include "colors.inc"
#macro TriTiles( PigArray )
#local hexBlock=pigment { radial pigment_map{
#local i=0; #while (i<6)[i/6 PigArray[i]]
[(i+1)/6 PigArray[i]] #local i=i+1; #end}}
radial pigment_map {#local i=1; #while (i<3)
[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 } warp {repeat x flip x }
warp {repeat sqrt(3)*z} scale .5
#end
#declare MyPigArray=array[6] {
pigment {color Red}
pigment {color Yellow}
pigment {color Green}
pigment {color Cyan}
pigment {color Blue}
pigment {color Magenta}
}
plane { y,0 pigment {TriTiles(MyPigArray)}}
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) |
Nieminen Juha wrote:
>
> J. Grimbert <jgr### [at] atos-group com> wrote:
> : I finally made my first patch in POV:
> : I added two patterns similar to the HEXAGON/CHECKER
> : one that fills the x-y plane with squares, alterning four "colours"
>
Well, in fact it is rather the x-z plane (but that does not change a lot
of thing)
> At least this one is easy to achieve without needing to patch povray.
> Something like:
>
Well, your code is bogus for infinite plane: just step the camera back a
little step (-50 instead of -5) and you will see the mirrorring of
gradient !
>
> My motto is: Why do something with an external program or patching
> povray, if you can do it with povray itself without noticeable performance
> loss?
Agreed, that's why I usually refute evolution asking for #for and other
syntaxic
sugar.
Nevertheless, a point for me: The rendering of with your code take (with
AA=0.3)
235 s while mine only 161 s (sample per pixel was 2.49 for your, 2.64
for mine,
with simple pigments rgb<1,0,0>,rgb<1,1,0>, rgb<0,1,1> and rgb<0,0,1>)
The memory consumption was also less with my code, about 1.5k over 92k
The image were not identical because of the gradient mirroring and the
ordering of
pigments (which may explain the different sample/pixels).
Either way you take it, as a 45% more time or 31% quicker, I do not
think the difference
is small.
Taking your argument to extrem, you should remove the sphere and box
objects, as they
are specialisation of the superellipsoid, and it also seems that the
cone can be removed
as also a specialisation of some quadric or quartic (or was it a more
complex polynomial
equation ...).
My motto is: KISS (Keep It Simple...)
--
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) |
"J. Grimbert" wrote:
>
> I finally made my first patch in POV:
> I added two patterns similar to the HEXAGON/CHECKER
> one that fills the x-y plane with squares, alterning four "colours"
> and another that fills the x-y plane with triangle, using six "colours".
>
> From the mathematical point of view, I felt they were missing from the
> very beginning
> (at least since HEXAGON has been added).
>
> The patch can be retrieved at:
> http://www.altern.org/grimbert/pov/index.html
>
> --
> J. Grimbert
> http://www.altern.org/grimbert/
Despite the comments from the other two skeptics in this thread I like the
idea of these two new patterns. I have one question though about the third
image on your page. If you look at the triangle pattern you can see visible
"cracking" in some places. Is this simply a matter of not enough AA when
you rendered the image or perhaps a jpg problem ?
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
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:
> #include "colors.inc"
> #macro TriTiles( PigArray )
> #local hexBlock=pigment { radial pigment_map{
> #local i=0; #while (i<6)[i/6 PigArray[i]]
> [(i+1)/6 PigArray[i]] #local i=i+1; #end}}
> radial pigment_map {#local i=1; #while (i<3)
> [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 } warp {repeat x flip x }
> warp {repeat sqrt(3)*z} scale .5
> #end
Now that is what I call perfectly indented Pov script.
Hooray Mr. Parker !!!
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
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 Tue, 31 Aug 1999 03:18:37 -0700, Ken wrote:
>Now that is what I call perfectly indented Pov script.
>
>Hooray Mr. Parker !!!
The original version of this code even had comments that said
something about "Tyler Syndrome" and mused about whether it
might be contagious. :)
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 wrote:
>
>
> Despite the comments from the other two skeptics in this thread I like the
> idea of these two new patterns. I have one question though about the third
> image on your page. If you look at the triangle pattern you can see visible
> "cracking" in some places. Is this simply a matter of not enough AA when
> you rendered the image or perhaps a jpg problem ?
>
Alas, none of these. The current images in the page were made with PSP.
(after the generation of the hexagon with a vector program...). Then a
copy with
transparent paper was done around the initial. The crack is due to the
my bad
precision of the hexagon... The square was easier to do...
I should update the images in a day or two with real povray rendered
pictures,
but my tests image were really too much bigger for anything worth.
Thanks for the interest.
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) |
J. Grimbert wrote in message <37CB67A5.A06CDF98@atos-group.com>...
<snip>
>Taking your argument to extrem, you should remove the sphere and box
>objects, as they
>are specialisation of the superellipsoid, and it also seems that the
>cone can be removed
>as also a specialisation of some quadric or quartic (or was it a more
>complex polynomial
>equation ...).
>
>My motto is: KISS (Keep It Simple...)
Please, let's not have this conversation again (see 'A modest proposal' in
p.p)
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) |
"J. Grimbert" wrote:
>
> Ken wrote:
> >
>
> >
> > Despite the comments from the other two skeptics in this thread I like the
> > idea of these two new patterns. I have one question though about the third
> > image on your page. If you look at the triangle pattern you can see visible
> > "cracking" in some places. Is this simply a matter of not enough AA when
> > you rendered the image or perhaps a jpg problem ?
> >
>
> Alas, none of these. The current images in the page were made with PSP.
> (after the generation of the hexagon with a vector program...). Then a
> copy with
> transparent paper was done around the initial. The crack is due to the
> my bad
> precision of the hexagon... The square was easier to do...
>
> I should update the images in a day or two with real povray rendered
> pictures,
This is done now.
In the meantime I also correct a small bug in the new triangular which
was drawing a visible line at x=0... Now it works perfectly, and quicker
than
the complicated _map ( 18 s instead of 26 s, without AA ).
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |