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
18 Jun 2024 08:32:24 EDT (-0400)
  Re: How to address last 2 components of 5-component vectors?  
From: clipka
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

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