POV-Ray : Newsgroups : povray.advanced-users : How to address last 2 components of 5-component vectors? Server Time
3 May 2024 01:41:57 EDT (-0400)
  How to address last 2 components of 5-component vectors? (Message 21 to 30 of 46)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 9 Jul 2016 23:20:01
Message: <web.5781be0cff0686005e7df57c0@news.povray.org>
Jim Holsenback <spa### [at] nothanksnet> wrote:

http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language

That works.
Just a few small things-

"Fourth", not "Forth"

Perhaps mention .gray?

(curious - Was .hf eliminated, or was it never implemented?)

The errors here:
http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2
Still exist (about halfway down the page)


Post a reply to this message

From: Le Forgeron
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 02:50:38
Message: <5781f03e$1@news.povray.org>
Le 10/07/2016 02:32, Jim Holsenback a écrit :
> On 7/7/2016 1:48 PM, Le_Forgeron wrote:
>> I would suggest to leave "Numeric_Expressions" as it is so far, and adding, in both
"Vector_Expressions" and "Colour_Expressions", a dedicated section about getting
individual component out of a vector and colour.
> 
>
http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language
> 

nice.
On the Vector Expression page, I like the "Dot Item Access for Colors", yet I would
add a note in parenthesis after that link about 5D vector that can be considered as
color. Because the head of the page states that Vector can be 5D for colors, and
actually the vector in
Spline can also be 5D (as well as some vector functions can return up to 5 terms), so
it is not fully limited to colors.

Now, the single letter (x,y,z,t) is a nice sequence which could enjoy a fifth letter,
but I do not know the usage in math for 5D. Obviously u & v are already disqualified.


Post a reply to this message

From: Le Forgeron
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 03:03:00
Message: <5781f324$1@news.povray.org>
Le 10/07/2016 05:16, Bald Eagle a écrit :
> Jim Holsenback <spa### [at] nothanksnet> wrote:
> 
>
http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language
> 
> That works.
> Just a few small things-
> 
> "Fourth", not "Forth"
> 
> Perhaps mention .gray?
> 
> (curious - Was .hf eliminated, or was it never implemented?)
> 

No, .hf is still present, but it was always only available in the function{} section,
nowhere else.
.gray is both available for function{} and on usual colours.
There is an interest for .gray, to get an evaluation of the luminosity. I hardly see
an interest for .hf outside function{}.

> The errors here:
> http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2
> Still exist (about halfway down the page)
> 
>

No error for that page, as it is a page about function{}. Just you cannot use .hf
outside of function{}.


Post a reply to this message

From: clipka
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 06:41:09
Message: <57822645$1@news.povray.org>
Am 10.07.2016 um 05:16 schrieb Bald Eagle:
> (curious - Was .hf eliminated, or was it never implemented?)

In the 3.6 docs, it is only mentioned in the isosurface tutorial, where
it is labeled "experimental", and in the source code it is even labeled
as unofficial, for MegaPOV compatibility only.

In fact, `.hf` is only available within functions; also, it is intended
to produce an "experimental feature" warning (but currently doesn't).


Post a reply to this message

From: Le Forgeron
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 07:03:26
Message: <57822b7e@news.povray.org>
Le 10/07/2016 12:41, clipka a écrit :
> Am 10.07.2016 um 05:16 schrieb Bald Eagle:
>> (curious - Was .hf eliminated, or was it never implemented?)
> 
> In the 3.6 docs, it is only mentioned in the isosurface tutorial, where
> it is labeled "experimental", and in the source code it is even labeled
> as unofficial, for MegaPOV compatibility only.
> 
> In fact, `.hf` is only available within functions; also, it is intended
> to produce an "experimental feature" warning (but currently doesn't).
> 

The code which set the flag is in comment in fncode.cpp ("// TODO
FIXME		Experimental_Flag |= EF_ISOFN;")

Now, should it remains an experimental feature... I do not know.


Post a reply to this message

From: William F Pokorny
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 08:30:09
Message: <57823fd1$1@news.povray.org>
On 07/09/2016 08:32 PM, Jim Holsenback wrote:
> On 7/7/2016 1:48 PM, Le_Forgeron wrote:
>> I would suggest to leave "Numeric_Expressions" as it is so far, and
>> adding, in both "Vector_Expressions" and "Colour_Expressions", a
>> dedicated section about getting individual component out of a vector
>> and colour.
>
>
http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language
>
On the page:

http://wiki.povray.org/content?title=Reference:Color_Expressions

wondering about the brackets around rgbft? I think there is no reason 
for them.

COLOR_VECTOR:
     rgb <3_Term_Vector>    |
     rgbf <4_Term_Vector>   |
     rgbt <4_Term_Vector>   |
     [ rgbft ] <5_Term_Vector> |
     srgb <3_Term_Vector>   |
     srgbf <4_Term_Vector>  |
     srgbt <4_Term_Vector>  |
     srgbft <5_Term_Vector>

Bill P.


Post a reply to this message

From: Le Forgeron
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 08:37:58
Message: <578241a6@news.povray.org>
Le 10/07/2016 14:30, William F Pokorny a écrit :
> On 07/09/2016 08:32 PM, Jim Holsenback wrote:
>> On 7/7/2016 1:48 PM, Le_Forgeron wrote:
>>> I would suggest to leave "Numeric_Expressions" as it is so far, and
>>> adding, in both "Vector_Expressions" and "Colour_Expressions", a
>>> dedicated section about getting individual component out of a vector
>>> and colour.
>>
>>
http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language
>>
> On the page:
> 
> http://wiki.povray.org/content?title=Reference:Color_Expressions
> 
> wondering about the brackets around rgbft? I think there is no reason for them.
> 
> COLOR_VECTOR:
>     rgb <3_Term_Vector>    |
>     rgbf <4_Term_Vector>   |
>     rgbt <4_Term_Vector>   |
>     [ rgbft ] <5_Term_Vector> |
>     srgb <3_Term_Vector>   |
>     srgbf <4_Term_Vector>  |
>     srgbt <4_Term_Vector>  |
>     srgbft <5_Term_Vector>
> 
> Bill P.

Actually, they are meaningful : a 5D vector would be interpreted as a rgbft colour
when nothing else is present (aka rgbft is implict).


Post a reply to this message

From: Bald Eagle
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 09:25:01
Message: <web.57824b95ff0686005e7df57c0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> Actually, they are meaningful : a 5D vector would be interpreted as a rgbft colour
when nothing else is present (aka 
rgbft is implict).

Then shouldn't that actually be said - explicitly, right there in the
documentation, right at that spot, where it belongs?
Even if it's "redundant"?
Because the documentation's purpose is to illuminate the reader - at the time of
reading.

*** And I'll bet that if someone like Bill P. found it confusing, then that
means that thousands of others likely will, or they will attach no special
meaning and implication to it. To me, that's not "documentation".



Also - forgive me, but I don't understand what you're trying to say.
What do you mean by "when nothing else is present"?
A 5D vector would have to have SOME kind of context, correct?
It doesn't just float in an otherwise empty .pov file.

                      <1, 2, 3, 4, 5>

Even if it's one line out of 10,000 (#declare Vector = <1, 2, 3, 4, 5>;) does it
really have any "implicit meaning"?

I understand that lesser vector quantities may get automatically "promoted" to
5D vectors by the parser because the parser - or the person(s) who program(med)
the parser had that in mind.  So, in that sense, the _promotion_ has an implied
purpose and meaning, but until the 5D vector is actually used for something,
it's just - 5 numbers.  Isn't it?

I'm currently using them as convenient little 5-element arrays that I don't have
to initialize.  The first three values are spatial coordinates, and those last 2
values have nothing whatsoever to do with color.


Post a reply to this message

From: clipka
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 10:34:35
Message: <57825cfb$1@news.povray.org>
Am 10.07.2016 um 15:20 schrieb Bald Eagle:
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> Actually, they are meaningful : a 5D vector would be interpreted
>> as a rgbft colour when nothing else is present (aka
>> rgbft is implict).
> 
> Then shouldn't that actually be said - explicitly, right there in the
> documentation, right at that spot, where it belongs?

Well, it does, exactly there, by virtue of those very square brackets.
It's the notation we use in all the syntax boxes in the reference
section: Like the vertical bar or three consecutive dots, square
brackets have a special meaning there.

> Even if it's "redundant"?
> Because the documentation's purpose is to illuminate the reader - at the time of
> reading.

And that's why the documentation later goes into more detail about
"Color Vectors", where it explicitly states: "Under some circumstances,
if the vector expression is a 5 component expression or there is a color
identifier in the expression then the rgbft keyword is optional."


> Also - forgive me, but I don't understand what you're trying to say.
> What do you mean by "when nothing else is present"?
> A 5D vector would have to have SOME kind of context, correct?
> It doesn't just float in an otherwise empty .pov file.

The context is described in the syntax box. In a nutshell, the box says
(among other things) that wherever POV-Ray expects or allows a COLOR, it
specifically allows a raw 5-term vector with no preceding `rgbft`.

Note that the syntax box technically doesn't say anything about the
/semantics/ of specifying a raw 5-term vector where a COLOR is allowed.
Most notably, it doesn't say anything about what happens if both a COLOR
and a VECTOR would be allowed, as is the case on the right-hand side of
a `#declare` statement. (As a matter of fact, a raw 5-term vector is
only interpreted as a colour when POV-Ray specifically /expects/ a COLOR.)


Post a reply to this message

From: William F Pokorny
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 10 Jul 2016 11:30:23
Message: <57826a0f$1@news.povray.org>
On 07/10/2016 08:37 AM, Le_Forgeron wrote:
> Le 10/07/2016 14:30, William F Pokorny a écrit :
>> On 07/09/2016 08:32 PM, Jim Holsenback wrote:
>>> On 7/7/2016 1:48 PM, Le_Forgeron wrote:
>>>> I would suggest to leave "Numeric_Expressions" as it is so far, and
>>>> adding, in both "Vector_Expressions" and "Colour_Expressions", a
>>>> dedicated section about getting individual component out of a vector
>>>> and colour.
>>>
>>>
http://wiki.povray.org/content/Documentation:Reference_Table_of_Contents#Scene_Description_Language
>>>
>> On the page:
>>
>> http://wiki.povray.org/content?title=Reference:Color_Expressions
>>
>> wondering about the brackets around rgbft? I think there is no reason for them.
>>
>> COLOR_VECTOR:
>>      rgb <3_Term_Vector>    |
>>      rgbf <4_Term_Vector>   |
>>      rgbt <4_Term_Vector>   |
>>      [ rgbft ] <5_Term_Vector> |
>>      srgb <3_Term_Vector>   |
>>      srgbf <4_Term_Vector>  |
>>      srgbt <4_Term_Vector>  |
>>      srgbft <5_Term_Vector>
>>
>> Bill P.
>
> Actually, they are meaningful : a 5D vector would be interpreted as a rgbft colour
when nothing else is present (aka rgbft is implict).
>
OK. If the optionality is what we are trying to indicate, I think we 
probably want something like :

COLOR_VECTOR:
      [rgb] float            | (promoted to 3 value vector)
      [rg0] <2 Term Vector>  |
      [rgb] <3_Term_Vector>  |
      [rgbf] <4_Term_Vector> |
      rgbt <4_Term_Vector>   |
      [ rgbft ] <5_Term_Vector> |
      srgb <3_Term_Vector>   |
      srgbf <4_Term_Vector>  |
      srgbt <4_Term_Vector>  |
      srgbft <5_Term_Vector>

Bill P.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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