POV-Ray : Newsgroups : povray.general : 3.2.1.6.5 in docs--clarification needed Server Time
29 Jul 2024 12:26:43 EDT (-0400)
  3.2.1.6.5 in docs--clarification needed (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 04:40:01
Message: <web.512dd32aaffa69f8c2d977c20@news.povray.org>
I've been using functions in POV-Ray for years now (successfully)--pigment
functions, functions for isosurfaces, etc. Yet I've never been able to make
sense of the examples given in the docs at 3.2.1.6.5  "Declaring User-Defined
Color Functions". It's not the set-up of the functions themselves that are
mysterious, but the examples of their use.

Here are the two code lines given there:

#declare Vec = foo(1,2,3)

and

#declare Val = foo(2,3,4).gray

What do the values (1,2,3) and (2,3,4) represent? There's no explanation given,
and I can't figure it out intuitively. (Is it simply a shorthand way of saying
(1*x,2*y,3*z)?) I've read and re-read the sections preceding this one, yet still
don't have a clue.


Post a reply to this message

From: Thomas de Groot
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 07:39:50
Message: <512dfe96$1@news.povray.org>
On 27-2-2013 10:34, Kenneth wrote:
> 3.2.1.6.5  "Declaring User-Defined Color Functions".

A bit difficult to find ;-)

in the 3.7 RC7 offline Docs: 3.3.1.8.5
in the online wiki Docs: 2.3.1.8.5

That said, I have been a bit confused too. I suppose the numbers stand 
for the x,y,z parameters of the function.

Thomas


Post a reply to this message

From: James Holsenback
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 09:43:10
Message: <512e1b7e@news.povray.org>
On 02/27/2013 07:39 AM, Thomas de Groot wrote:
> On 27-2-2013 10:34, Kenneth wrote:
>> 3.2.1.6.5  "Declaring User-Defined Color Functions".
>
> A bit difficult to find ;-)
>
> in the 3.7 RC7 offline Docs: 3.3.1.8.5
> in the online wiki Docs: 2.3.1.8.5

That's where I find them as well, so I don't know where Ken got his 
annotation ... perhaps 3.6 but hey that's ancient history right? It's 
usually more meaningful to say ... e.g: in the Reference 3.1.8.5

As far as the content at Reference 3.1.8.5 ... user defined functions is 
an advanced technique. If you've gotten that far there does seem to be a 
build in assumption ... not that big of a leap IMHO.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 10:05:01
Message: <web.512e207def3a5b5981c811d20@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 02/27/2013 07:39 AM, Thomas de Groot wrote:
> > On 27-2-2013 10:34, Kenneth wrote:
> >> 3.2.1.6.5  "Declaring User-Defined Color Functions".
> >
> > A bit difficult to find ;-)
> >
> > in the 3.7 RC7 offline Docs: 3.3.1.8.5
> > in the online wiki Docs: 2.3.1.8.5
>
> That's where I find them as well, so I don't know where Ken got his
> annotation ... perhaps 3.6 but hey that's ancient history right? It's
> usually more meaningful to say ... e.g: in the Reference 3.1.8.5
>
> As far as the content at Reference 3.1.8.5 ... user defined functions is
> an advanced technique. If you've gotten that far there does seem to be a
> build in assumption ... not that big of a leap IMHO.

In the 3.7 RC6 help file that opens up for me it is section 3.2.1.6.5
I suppose I should be installing RC7.


For what it does:

#declare Vec = foo(1,2,3) returns the rgb value at the (x,y,z) coordinate
(1,2,3)


#declare Val = foo(2,3,4).gray does the same thing, but then converts it to a
single gray value based on rgb->grey conversion formula.


-tgq


Post a reply to this message

From: Thomas de Groot
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 10:07:08
Message: <512e211c$1@news.povray.org>
On 27-2-2013 15:43, James Holsenback wrote:
> That's where I find them as well, so I don't know where Ken got his
> annotation ... perhaps 3.6 but hey that's ancient history right? It's
> usually more meaningful to say ... e.g: in the Reference 3.1.8.5
>
> As far as the content at Reference 3.1.8.5 ... user defined functions is
> an advanced technique. If you've gotten that far there does seem to be a
> build in assumption ... not that big of a leap IMHO.
>

As for me, I have not gotten that far myself.  ;-)

Thomas


Post a reply to this message

From: Warp
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 11:14:10
Message: <512e30d2@news.povray.org>
Kenneth <kdw### [at] gmailcom> wrote:
> Here are the two code lines given there:

> #declare Vec = foo(1,2,3)

> and

> #declare Val = foo(2,3,4).gray

> What do the values (1,2,3) and (2,3,4) represent?

They mean whatever the function wants them to mean. The function
constructs the vector from those values.

-- 
                                                          - Warp


Post a reply to this message

From: James Holsenback
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 12:43:19
Message: <512e45b7$1@news.povray.org>
On 02/27/2013 10:04 AM, Trevor G Quayle wrote:
> James Holsenback <nom### [at] nonecom> wrote:
>> On 02/27/2013 07:39 AM, Thomas de Groot wrote:
>>> On 27-2-2013 10:34, Kenneth wrote:
>>>> 3.2.1.6.5  "Declaring User-Defined Color Functions".
>>>
>>> A bit difficult to find ;-)
>>>
>>> in the 3.7 RC7 offline Docs: 3.3.1.8.5
>>> in the online wiki Docs: 2.3.1.8.5
>>
>> That's where I find them as well, so I don't know where Ken got his
>> annotation ... perhaps 3.6 but hey that's ancient history right? It's
>> usually more meaningful to say ... e.g: in the Reference 3.1.8.5
>>
>> As far as the content at Reference 3.1.8.5 ... user defined functions is
>> an advanced technique. If you've gotten that far there does seem to be a
>> build in assumption ... not that big of a leap IMHO.
>
> In the 3.7 RC6 help file that opens up for me it is section 3.2.1.6.5
> I suppose I should be installing RC7.

apologies Ken ... history but not so ancient ;-)


Post a reply to this message

From: James Holsenback
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 12:51:14
Message: <512e4792$1@news.povray.org>
On 02/27/2013 12:43 PM, James Holsenback wrote:
> On 02/27/2013 10:04 AM, Trevor G Quayle wrote:
>> James Holsenback <nom### [at] nonecom> wrote:
>>> On 02/27/2013 07:39 AM, Thomas de Groot wrote:
>>>> On 27-2-2013 10:34, Kenneth wrote:
>>>>> 3.2.1.6.5  "Declaring User-Defined Color Functions".
>>>>
>>>> A bit difficult to find ;-)
>>>>
>>>> in the 3.7 RC7 offline Docs: 3.3.1.8.5
>>>> in the online wiki Docs: 2.3.1.8.5
>>>
>>> That's where I find them as well, so I don't know where Ken got his
>>> annotation ... perhaps 3.6 but hey that's ancient history right? It's
>>> usually more meaningful to say ... e.g: in the Reference 3.1.8.5
>>>
>>> As far as the content at Reference 3.1.8.5 ... user defined functions is
>>> an advanced technique. If you've gotten that far there does seem to be a
>>> build in assumption ... not that big of a leap IMHO.
>>
>> In the 3.7 RC6 help file that opens up for me it is section 3.2.1.6.5
>> I suppose I should be installing RC7.
>
> apologies Ken ... history but not so ancient ;-)
>

Oh and if you guys haven't already noticed the Reference has undergone a 
bit of a re-organization


Post a reply to this message

From: Trevor G Quayle
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 13:55:02
Message: <web.512e5673ef3a5b5981c811d20@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 02/27/2013 12:43 PM, James Holsenback wrote:
> Oh and if you guys haven't already noticed the Reference has undergone a
> bit of a re-organization

Is there a reason for the reorganization?  Usually reference standards try to
preserve their organization and clause numbering where possible to maintain
continuity.  Certainly people using the newest version can use the new reference
and be followed, however, if people are reading back at old postings on various
topics, it can cause some confusion.

-tgq


Post a reply to this message

From: Stephen
Subject: Re: 3.2.1.6.5 in docs--clarification needed
Date: 27 Feb 2013 14:07:20
Message: <512e5968$1@news.povray.org>
On 27/02/2013 4:14 PM, Warp wrote:
> Kenneth <kdw### [at] gmailcom> wrote:
>> Here are the two code lines given there:
>
>> #declare Vec = foo(1,2,3)
>
>> and
>
>> #declare Val = foo(2,3,4).gray
>
>> What do the values (1,2,3) and (2,3,4) represent?
>
> They mean whatever the function wants them to mean. The function
> constructs the vector from those values.
>

Do you mean that you could write:

#declare Vec = foo(A,B,C)
#declare Val = foo(X,Y,Z).gray
or
#declare Val = foo(1,2,3).gray
even

And that would the same as writing:

#declare Vec = foo(1,2,3)
#declare Val = foo(2,3,4).gray
?

-- 
Regards
     Stephen


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.