POV-Ray : Newsgroups : povray.general : How to extract the fifth value of a 5D vector? : Re: How to extract the fifth value of a 5D vector? Server Time
1 Aug 2024 12:27:14 EDT (-0400)
  Re: How to extract the fifth value of a 5D vector?  
From: JYR
Date: 28 Oct 2005 10:25:01
Message: <web.436233b293f5284339b8d62e0@news.povray.org>
"Roman Reiner" <lim### [at] gmxde> wrote:
> Is this really the only possibility? Isn't it somehow silly to support
> 5D-Vectors without supporting a fifth dot-operater to get this additional
> value?

Actually, 5D-vectors are to be thought of as colors... see:

3.2.1.4.3  Operators
<...>The dot operator is also used in color expressions which are covered
later.

3.2.1.5.4  Color Operators
<...>You may use the dot operator to extract a single component from a
color. Suppose the identifier Shade was previously defined as a color. Then
Shade.red is the float value of the red component of Shade. Similarly
Shade.green, Shade.blue, Shade.filter and Shade.transmit extract the float
value of the other color components. shade.gray returns the gray value of
the color vector.

Hoping this helps!!!

JYR


Post a reply to this message

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