|
|
clipka <ano### [at] anonymousorg> wrote:
> "These are not the functions you are looking for."
Your Jedi mind tricks don't work on me, clipka.
> To the best of my knowledge, those functions actually correspond to the
> `tiling 2` pattern, not the `hexagon` pattern.
I think there may be other closely related patterns in that same file, however
the functions.inc references the f_hex_x pattern, and I came across this early
thread, which I think might be before the pavement tilings were available.
http://news.povray.org/povray.general/thread/%3Cj### [at] netplexaussieorg%3E/?ttop=285799&toff=320
0
> The `hexagon` pattern is implemented by `HexagonPattern::Evaluate()` in
> `source/core/material/pattern.cpp` (approx. line 6510).
Well, I'll certainly give it all a look over as time is available.
> Note however that the function is implemented using imperative
> programming, and needs to be re-formulated as a pure function in order
> to implement it as an SDL function.
Yes, I had gotten that far, and believe I _might_ be able to do it with a few
functions and select() [The code is at home, otherwise I'd post it for
early-stage critical review]
> Also, the function returns values 0, 1 or 2 to select the texture,
> whereas a function to be used in a function-based pigment needs to
> return values in the rang 0..1 (e.g. 0/N, 1/N, 2/N, ..., N/N) to select
> the texture from a texture map.
Yep, I think that's the idea. Hopefully I'll be able to figure that part out
once I get the basics worked out and can better see the overall picture of how
to construct the pattern.
However, I'm also wondering if I can't somehow come up with a pattern that would
allow the tricks over in the bricks pattern thread to be used. Or if somehow
that trick can be applied to the existing hexagon pattern[s] to eliminate the
need for writing a special function.
Post a reply to this message
|
|