POV-Ray : Newsgroups : povray.general : Hexagon pattern with 4 or 7 colors? : Re: Hexagon pattern with 4 or 7 colors? Server Time
27 Apr 2024 15:07:17 EDT (-0400)
  Re: Hexagon pattern with 4 or 7 colors?  
From: Kenneth
Date: 10 May 2018 05:40:00
Message: <web.5af412fa97bd1601a47873e10@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> Here's a much better-looking color_map to use (for all THREE pigments.)...
>
> The new one:
>     color_map{
>         [0.0 rgb <1,0,0>]
>         [0.5 rgb 0.47*<0,1,0>]
>         [1.0 rgb 0.99*<0,0,1>]
>              }
>
> OR, the srgb version...
>     color_map{
>         [0.0 srgb <1,0,0>]
>         [0.5 srgb .715*<0,1,0>]
>         [1.0 srgb .99*<0,0,1>]
>              }

Well, that's wrong :-/

The *idea* is to get a continuous spectrum of colors, from red to green to
blue-- and those index-list values certainly don't do that. The index should be
divided into THREE equal segments. The following is much better...

           blend_mode ...  // optional
           blend_gamma ... // optional
           [0.0     rgb <1,0,0>]
           [0.333   rgb <0,1,0>]
           [0.666   rgb <0,0,1>]
           [1.0     rgb <1,0,0>]

BTW, it makes no difference if you use srgb colors instead, because the three
colors are all at FULL intensity. The srgb 'gamma curve' only applies to values
*between* 0.0 and 1.0.


Post a reply to this message

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