POV-Ray : Newsgroups : povray.advanced-users : Help with eval_pigment : Re: Help with eval_pigment Server Time
29 Jul 2024 12:15:33 EDT (-0400)
  Re: Help with eval_pigment  
From: Mike Williams
Date: 12 Mar 2002 02:54:46
Message: <ywebjCA$Obj8EwlZ@econym.demon.co.uk>
Wasn't it Alf Peake who wrote:
>v3.5 question.
>
>The docs say that eval_pigment() evaluates the color of a pigment. Am
>I wrong in treating this as a vector?  If not, what am I doing here
>that annoys vlength() or sqrt(vdot(,)) in 3.5? It worked fine in
>MegaPov 0.7.

In 3.5, colours are 5d vectors (red, blue, green, filter, transmit), but
vlength only works with 3d vectors.

You can either convert your colour to a 3d vector
        vlength(<Pig9.x,Pig9.y,Pig9.z>)
or use VLength5D from "math.inc"
        VLength5D(Pig9)
If filter and transmit both happen to be zero, the two methods give the
same value.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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