POV-Ray : Newsgroups : povray.general : colour-index Server Time
6 Aug 2024 19:32:46 EDT (-0400)
  colour-index (Message 1 to 2 of 2)  
From: christian
Subject: colour-index
Date: 13 Jan 2002 16:55:34
Message: <3C420247.91FE7DBD@yahoo.com>
Hy,
this is not a very specific pov-question, but perhaps you can help.
I want to colour my geometric objects according to values. My
value-range for temperature is from 0 to 100 and I my objects should
have a specific colour (for example the colour should go from blue
(cold) to red (hot) with n (free) steps). Do you have an idea how to get
something like a colour-table of the red green blue values of the
objects if you get the number n of the intervals ?

Thanks a lot


Post a reply to this message

From: Christopher James Huff
Subject: Re: colour-index
Date: 13 Jan 2002 17:54:42
Message: <chrishuff-81CCBA.17553013012002@netplex.aussie.org>
In article <3C420247.91FE7DBD@yahoo.com>,
 christian <chr### [at] yahoocom> wrote:

> this is not a very specific pov-question, but perhaps you can help.
> I want to colour my geometric objects according to values. My
> value-range for temperature is from 0 to 100 and I my objects should
> have a specific colour (for example the colour should go from blue
> (cold) to red (hot) with n (free) steps). Do you have an idea how to get
> something like a colour-table of the red green blue values of the
> objects if you get the number n of the intervals ?

Using POV 3.1: If your objects are solid colors, you could make an 
ordinary color_map with the temperature scale you want, and use a 
gradient pattern scaled very large so that there is no visible gradient 
across the object.
sphere {< 0, 0, 0>, X
    pigment {gradient y
        color_map {TempScl}
        translate -y*Temperature
        scale 10000
    }
}

Using MegaPOV: Use a color_map with a gradient pattern as above, but 
leave it with the default scale and evaluate the color directly with the 
eval_pigment() function:
eval_pigment(pigment {gradient y color_map {TempScl}}, Temperature*y)

POV 3.5 beta: You can do the same thing you did with MegaPOV using a 
pigment function or the eval_pigment() macro in functions.inc.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

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