POV-Ray : Newsgroups : povray.general : smooth gradient color_map : Re: smooth gradient color_map Server Time
1 May 2024 23:19:19 EDT (-0400)
  Re: smooth gradient color_map  
From: Le Forgeron
Date: 22 Jul 2017 14:11:01
Message: <59739535$1@news.povray.org>
Le 22/07/2017 à 00:28, jr a écrit :
> hi,
> 
> can someone please point me to a color_map example which provides a
> smooth blend/gradient from (ideally) blue at 0 to red at 1 in 254
> increments?  I'd prefer a solution which does not require (an array of)
> named colours.

From Blue to Red... in which colorspace would the transition be ?


The naive might expects a change in Hue, in HSV or HSL colorspace, with
a vibrant magenta at 0.5 (or going the other way on the circle, blue,
cyan, green, yellow, red ?)

You might want to have a look at the CHSL2RGB macro from colors.inc and
use it in the code provided in the other posts of this thread.


Post a reply to this message

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