POV-Ray : Newsgroups : povray.object-collection : SharkD's HSV,HSL, etc. : Re: SharkD's HSV,HSL, etc. Server Time
6 Jun 2023 23:12:43 EDT (-0400)
  Re: SharkD's HSV,HSL, etc.  
From: Warp
Date: 4 Jul 2008 06:47:39
Message: <486dffcb@news.povray.org>
Karl Anders <kar### [at] webde> wrote:
> color_map
> {
>    [0 rgb <1, 0, 0>]
>    [1/3 rgb <0, 1, 0>]
>    [2/3 rgb <0, 0, 1>]
>    [1 rgb <1, 0, 0>]
> }

> so the best approximation to yellow is rgb<0.5,0.5,0> at 1/6.

> I feel that should be changed to
> color_map{
>    [ 0   rgb < 1, 0, 0 > ]
>    [ 1/6 rgb < 1, 1, 0 > ]
>    [ 2/6 rgb < 0, 1, 0 > ]
>    [ 3/6 rgb < 0, 1, 1 > ]
>    [ 4/6 rgb < 0, 0, 1 > ]
>    [ 5/6 rgb < 1, 0, 1 > ]
>    [ 1   rgb < 1, 0, 0 > ]
> }

  I'd say you are right. Linearly interpolating between the three RGB
components is definitely not the same thing as interpolating the hue
ring. While your proposed solution might still not be *exactly* the
same thing as a hue ring (more likely it's a hue hexagon, which is
just slightly different), it definitely is much closer.

-- 
                                                          - Warp


Post a reply to this message

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