POV-Ray : Newsgroups : povray.general : Color usage and crash : Re: Color usage and crash Server Time
25 Apr 2024 02:26:22 EDT (-0400)
  Re: Color usage and crash  
From: Alain
Date: 6 Sep 2019 12:48:30
Message: <5d728dde$1@news.povray.org>
Le 19-09-02 à 11:25, kurtz le pirate a écrit :
> Hi,
> 
> Inside a loop, i compute a color with this basic code :
>      #declare thisHSL = rgb <360*i/N, 1, 0.40>;
>      #declare thisRGB = CHSL2RGB(thisHSL);
> 
> 
> Always in the same loop, if i use the color like that :
>          pigment {rgb thisRGB }
> 
> POVRay say : Parse warning : Suspicious expression after rgb.
> And after progress in loop, crash !!!
> 
> On the other hand, if i use the color like that :
>      pigment {rgb <thisRGB.red, thisRGB.green, thisRGB.blue> }
> 
> all is OK !
> 
> Where is a problem ?
> 
> 
> I use POV-Ray 3.8.0-alpha10013324.unofficial on Mac.
> 
> 
CHSL2RGB() return the result as rgbft<Red, Green, Blue, Filter, Transmit>

thisHSL<R,G,B> get promoted to thisHSL<R,G,B,0,0>

The message come from assigning a 5D vector to a 3D destination : There 
is a mismatch.

So, use : pigment {rgbft thisRGB }


Post a reply to this message

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