POV-Ray : Newsgroups : povray.advanced-users : How to address last 2 components of 5-component vectors? : Re: How to address last 2 components of 5-component vectors? Server Time
25 Apr 2024 10:04:34 EDT (-0400)
  Re: How to address last 2 components of 5-component vectors?  
From: Le Forgeron
Date: 7 Jul 2016 13:48:17
Message: <577e95e1$1@news.povray.org>
Le 07/07/2016 19:16, Jim Holsenback a écrit :
> On 7/7/2016 10:37 AM, Le_Forgeron wrote:
>> Le 07/07/2016 15:30, Bald Eagle a écrit :
>>> At first I mis-read the docs and thought I could have 6-component vectors, and
>>> address them x, y, z, t, u, v.
>>>
>>> I trimmed that to 5, and thought that maybe x, y, z, u, v was the way to go, but
>>> I should have known better.
>>>
>>> I need to use those last 2 values - what are they called?
>>>
>>
>> Bad, bad wiki (In the mood of "Bad, bad zoot", of "Monty Python and the Holy
Grail")
>> You can access the component of 5D vector as a colour: red, green, blue, filter,
transmit
>>
>> Yes, in that order. Which mean that .t == .filter, not .transmit
>>
> 
> OK ... so please be a bit more specific. What /exactly/ is "bad" and needs
clarification. Comment on the talk page and I'll work it into the docs.

As stated in the talk page of Vector Expressions:
The page Vector sends to Numeric Expression, but that one dismiss any details about
DOT_ITEM by sending back to Vector / Colour Pages, none of which cover the subject.

In Numerics Expressions page, we have "The DOT_ITEM syntax is actually a vector or
color operator but it returns a float value. See Vector Operators or Color Operators
for details".

It reminds me of the house that get you mad, in Asterix (The twelve tasks of Asterix,
8th task): To get permit A38, you need the blue sheet... to get the blue sheet, you
need to apply with the pink and green ...

Here the loop is smaller, but no one would give a newbie the information about getting
a component from a vector (or colour).

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.

In that section, the illustration of dot item with a basic example. Such as:

#declare Vector = < 1, 2, 3, 4, 5>;
#declare First_Component_1 = Vector.red;// 1
#declare First_Component_2 = Vector.u;// 1
#declare First_Component_3 = Vector.x;// 1
#declare Second_Component_1 = Vector.green;// 2
#declare Second_Component_2 = Vector.v;// 2
#declare Second_Component_3 = Vector.y;// 2
#declare Third_Component_1 = Vector.blue;// 3
#declare Third_Component_2 = Vector.z;// 3
#declare Fourth_Component_1 = Vector.filter;// 4
#declare Fourth_Component_2 = Vector.t;// 4
#declare Fifth_Component = Vector.transmit;// 5

(and repeat with a Colour= rgbtf <...> )

The section need a visible title (visible in Table of content)

// Above text was also added into the talk page. Best regards.


Post a reply to this message

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