|
 |
"Kenneth" <kdw### [at] gmail com> wrote:
> "rastertastic" <nomail@nomail> wrote:
>
> >
> > So basically I'm asking clarification on how to use such self-defined functions
> > like x + y + z as patterns with, say, color maps.
>
> Here's a simple example...
>
> #declare Foo = function(x,y){2*x + 2*y}
>
> box{<0,0,0>, <1,1,.01>
> pigment {
> function {Foo(x,y)}
> sine_wave // otherwise, a default 'ramp' wave is used
> color_map{
> [0 rgb 0]
> [1 rgb 1]
> }
> }
> }
This just discards the z position of the function.
> BTW, somewhere in the POV-Ray documentation, it states that when using a
> function as a pigment or pigment pattern, the 'image' of the function is
> actually just an infinitely thin slice, taken in the x/y plane (x from 0.0 to
> 1.0, y from 0.0 to 1.0). You can change the location of that slice, though:
> #declare Foo = function(x,y){2*(x + 1.7) + 2*y}
It does not say that, the pattern function is three dimensional, not two
dimensional. You are free to not use all three dimensions though.
Post a reply to this message
|
 |