POV-Ray : Newsgroups : povray.general : Hexagon pattern with 4 or 7 colors? : Re: Hexagon pattern with 4 or 7 colors? Server Time
28 Apr 2024 01:25:19 EDT (-0400)
  Re: Hexagon pattern with 4 or 7 colors?  
From: Bald Eagle
Date: 10 May 2018 11:10:01
Message: <web.5af45fed97bd1601c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> 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.

Well, I'd suggest using the HSV color conversion macro in colors.inc, and
calculate the rgb values that way.  Not sure if that will give you exactly what
you want, but plugging in 0, 120, and 240 for hue angle values might just do it.

I think this ought to get you real close to what you want:
(untested - writing this in as close to the proper syntax as I can)

#declare Color1 = HSV2RGB (  0, 1, 1, 0, 0)
#declare Color2 = HSV2RGB (120, 1, 1, 0, 0)
#declare Color3 = HSV2RGB (240, 1, 1, 0, 0)

....

[(0/3) rgb Color1]
[(1/3) rgb Color2]
[(2/3) rgb Color3]
[(3/3) rgb Color1]


Post a reply to this message

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