POV-Ray : Newsgroups : povray.general : using eval_pigment--some questions before starting : Re: using eval_pigment--some questions before starting Server Time
30 Jul 2024 02:20:13 EDT (-0400)
  Re: using eval_pigment--some questions before starting  
From: Kenneth
Date: 3 Feb 2010 11:20:00
Message: <web.4b69a17980570be665f302820@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> Internaly, there is little difference between a 3D colour vector, a
> location vector, a translation vector and a rotation vector.
> <1,2,3>.x will return the same thing as <1,2,3>.red

Sorry for the delay--POV-Ray 3.6.1 crashed on me yesterday (no fault of it's
own), and I'm having problems installing 3.6.2 for Windows...so I can't test
anything out right now, or even read the 'Help' files.

But back to your reply: I'm not so sure that's correct (although I could be
wrong); the fault may be in how I worded my original questions.

I'll assume that eval_pigment returns a 5-component vector, as you say.

Here's an example of what concerns me: I can #declare a 5-component vector one
of two ways...
#declare my_vector = <.1,.8,.5,.3,.4>;
// or...
#declare my_vector = rgbft <.1,.8,.5,.3,.4>;

I call the first example a 'generic' vector, with no color information attached.
If I use a dot operation on it--like my_vector.y--it will (or should!) give me
just that component-- .8 --- as a simple single float value, AFAIK. If I do the
same with the 2nd example--which POV sees as a COLOR vector--then my_vector.y
will return <.8,.8,.8,.8,.8>---no longer a float but another 5-component vector
(described as one of the 'common color pitfalls' in the documentation, if I
understand it correctly.) If I don't 'correct' for this situation, it could have
unintended consequences later, depending on how I use my_vector.y

SO...the real question I have is, does eval_pigment give me just
<.1,.8,.5,.3,.4> or rgbft <.1,.8,.5,.3,.4>?

Ken


Post a reply to this message

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