![](/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) |
Thorsten Froehlich <tho### [at] trf de> wrote:
:> function 300,300
:> {
:> pigment
: Unrelated to your problem, I am wondering why you are using a pigment here.
: A pattern would be much easier to control...
Also unrelated, but this made me remember one thing:
Can image functions be declared? I remember trying it once but not
succeeding (IIRC it issued an error at the first number).
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - 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) |
In article <3ba2116a@news.povray.org> , Warp <war### [at] tag povray org> wrote:
> Can image functions be declared? I remember trying it once but not
> succeeding (IIRC it issued an error at the first number).
You should be able to write a function and call it just the same way as you
call functions in isosurfaces: function { foo(x,y,z) }
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
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) |
Thorsten Froehlich <tho### [at] trf de> wrote:
: You should be able to write a function and call it just the same way as you
: call functions in isosurfaces: function { foo(x,y,z) }
What I mean is that if I write something like this:
#declare MyImageFunction = function 256,256 { pattern { ... } }
I get an error at the first '256' (if I remember correctly; I can't confirm
this right now as I'm not at home).
PS: It might be that it works and that I just typoed somewhere (eg. forgot
the comma or something), and if this is so, just ignore this... :)
I'll get home soon and test it again.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - 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) |
In article <3ba22523@news.povray.org> , Warp <war### [at] tag povray org> wrote:
>
> What I mean is that if I write something like this:
>
> #declare MyImageFunction = function 256,256 { pattern { ... } }
>
> I get an error at the first '256' (if I remember correctly; I can't confirm
> this right now as I'm not at home).
>
> PS: It might be that it works and that I just typoed somewhere (eg. forgot
> the comma or something), and if this is so, just ignore this... :)
> I'll get home soon and test it again.
Well, you write
#declare MyImageFunction = function { pattern { ... } }
height_field
{
...
function 256, 256 { MyImageFunction(x,y,z) }
}
which is exactly what the syntax description in the docs says.
I don't see why one would declare an image and be surprised that is doesn't
work (as that is what your example tries to do) - it isn't possible at all
with any image map type and never has been...
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
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) |
> Unrelated to your problem, I am wondering why you are using a pigment
here.
> A pattern would be much easier to control...
Something which I do not see in the docs is an explanation about how to
properly use 'pattern' in a 'function'. You don't say whether or not it will
be grayscale. Or maybe I just totally missed it.
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) |
In article <3ba236a4@news.povray.org> , "Tony[B]" <ben### [at] catholic org>
wrote:
> Something which I do not see in the docs is an explanation about how to
> properly use 'pattern' in a 'function'. You don't say whether or not it will
> be grayscale. Or maybe I just totally missed it.
Oh, good point. The documentation kind of assumes you know that the pattern
functions are return a scalar, not a vector, and thus a pattern is
grayscale. Maybe the docs should explain the difference between pigment and
pattern functions better, in particular for the image-map-function ... Ingo,
are you reading this?
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
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) |
in news:3ba249f3@news.povray.org Thorsten Froehlich wrote:
> Ingo,
> are you reading this?
>
Yes
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |
In article <Xns### [at] povray org> , ingo <ing### [at] home nl>
wrote:
>> Ingo,
>> are you reading this?
>>
>
> Yes
Could you add a scentence or two in the function-image-type section that
explains that a pattern function will be easier to use for a function-image
compared to a pigment function which generates an unnecessary color
information that is useless when the function-image is used for a
height_field.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
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) |
In article <Xns### [at] povray org> , ingo <ing### [at] home nl>
wrote:
>> Ingo,
>> are you reading this?
>>
>
> Yes
Could you add a scentence or two in the function-image-type section that
explains that a pattern function will be easier to use for a function-image
compared to a pigment function which generates an unnecessary color
information that is useless when the function-image is used for a
height_field.
And maybe try to make it a bit more clear that a pattern function returns a
scalar and a pigment function returns a color vector (I am not sure how and
where to add this though).
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
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) |
in news:3ba251dd$1@news.povray.org Thorsten Froehlich wrote:
> And maybe try to make it a bit more clear that a pattern function
> returns a scalar and a pigment function returns a color vector (I
> am not sure how and where to add this though).
>
I'll figure out something.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |