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
3 May 2024 12:54:08 EDT (-0400)
  Re: How to address last 2 components of 5-component vectors?  
From: clipka
Date: 10 Jul 2016 17:15:00
Message: <5782bad4$1@news.povray.org>
Am 10.07.2016 um 20:32 schrieb William F Pokorny:

> I think I generally understand the promotion and demotion going on when
> colors are expected and we have various floats or vectors as the
> starting point/right-hand-argument.
> 
> When I originally questioned the line:
> 
> [ rgbft ] <5_Term_Vector> |
> 
> it was because our saying rgbft was optional per the brackets in just
> the five term vector case did not make sense to me for a syntax
> specification.
> 
> That "...the missing terms are automatically created from existing input
> when needed" is the point.
> 
> The rgb string is also optional for a float and multiple vector
> specifications. Why is it we are not showing the user it is optional
> with brackets as in [rgb], but doing it for rgbft and the 5 term vector
> case?

Because this allows to put a bit of semantic information between the
lines: If none of the colour keywords is specified at all, behaviour is
as if `rgbft` was used.

The only sensible alternatives (and the ones most closely matching the
actual internal processing) would be to specify either

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> |
     <5_Term_Vector>

which loses that between-the-lines information about the semantics, or

COLOR_VECTOR:
     [ rgb | rgbf | rgbt | rgbft | srgb | srgbf | srgbt |
     srgbft ] VECTOR

which discards even more information about the semantics.


Post a reply to this message

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