POV-Ray : Newsgroups : povray.advanced-users : How to address last 2 components of 5-component vectors? Server Time
17 May 2024 22:35:22 EDT (-0400)
  How to address last 2 components of 5-component vectors? (Message 17 to 26 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: 7 Jul 2016 15:00:00
Message: <web.577ea5e5ff0686005e7df57c0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> Add a note in the talk page, at the end of it. If possible, provide also the text
you would like to see.

I don't have a login for the wiki pages.
I suppose I need to create an account and a login if you want me to post things
over there, and it's not clear how to do that.


Post a reply to this message

From: Jim Holsenback
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 7 Jul 2016 16:09:26
Message: <577eb6f6$1@news.povray.org>
On 7/7/2016 2:56 PM, Bald Eagle wrote:
> Le_Forgeron <jgr### [at] freefr> wrote:
>
>> Add a note in the talk page, at the end of it. If possible, provide also the text
you would like to see.
>
> I don't have a login for the wiki pages.
> I suppose I need to create an account and a login if you want me to post things
> over there, and it's not clear how to do that.
>
>
just post here ... turned off account creation a while ago due to 
excessive spamming


Post a reply to this message

From: Bald Eagle
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 7 Jul 2016 19:10:00
Message: <web.577ee122ff0686005e7df57c0@news.povray.org>
Suggested language for that section:

This is a vector function, since it returns a 5-component color vector of the
rgbft type which can then be used in other functions to generate isosurfaces.
The function must be declared before the vector data can be accessed.
Any individual component of the rgbft vector can then be used just like any
other variable.  When using the vector component identifiers, you have to
specify exactly which component of the color vector should be used, and that is
done with the "dot notation."

For the examples below, refer to the above pigment function: fn_Pigm(x,y,z)

When the pigment function is evaluated for any <x, y, z>, it returns a color
vector as a result
That color vector has five "terms" or "components" which define the pigment in
3D space for every x, y, and z.
Several components have equivalent and interchangeable "dot" notations which is
useful depending upon what the vector is describing - a point in space, a color,
or uv-mapped points.

To specify these individual vector components, use the following "dot" types:

fn_Pigm( ).x | fn_Pigm( ).u | fn_Pigm( ).red
to get the red value of the color vector
(or the first term of _any_ 3, 4, or 5-term vector)
All 3 dot notations for the vector component refer to the same value and so give
the same result.  All of the below notations work in an analogous manner.

fn_Pigm( ).y | fn_Pigm( ).v | fn_Pigm( ).green
to get the green value of the color vector
(or the second term of _any_ 3, 4, or 5-term vector)

fn_Pigm( ).z | fn_Pigm( ).blue
to get the blue value of the color vector
(or the third term of _any_ 3, 4, or 5-term vector)

fn_Pigm( ).filter | fn_Pigm( ).t
to get the filter value of the color vector
(or the fourth term of _any_ 4 or 5-term vector)
[*For clarity, note that this is .filter, spelled-out, or .t _not_ .f]

fn_Pigm( ).transmit
to get the transmit value of the color vector
(or the fifth term of _any_ 5-term vector)
[*For clarity, note that this is .transmit, spelled-out, _not_ .t]

There is also a special-purpose operator, which returns a weighted grayscale
value:

fn_Pigm( ).gray to get the gray value of the color vector
The internal formula for calculating this gray value is as follows:
gray value = Red*0.297 + Green*0.589 + Blue*0.114

[The alternate spelling, ".grey", and .g are not supported as of version 3.7]

[Also, POV-Ray calculates heightfield values from vector data. Although that
value cannot currently be accessed with dot notation like the grayscale values,
the formula for calculating a heightfield value is:  hf value = (Red +
Green/255)*0.996093]


Post a reply to this message

From: Jim Holsenback
Subject: Re: How to address last 2 components of 5-component vectors?
Date: 9 Jul 2016 20:32:41
Message: <578197a9$1@news.povray.org>
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


Post a reply to this message

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

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

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