|
![](/i/fill.gif) |
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> sitha wrote:
>>> You can have a small, long box coloured by an apropriate gradient in a corner or
>>> along an edge of your image.
>>> Use some text objects to mark the reference points and units.
>>> Tick marks can be done using tiny box or cylinders.
>>> Try using the screen.inc to get the tools to help you place it correctly.
>>> There is a sample scene that show a possible use of that include.
>>>
>>> --
>>> Alain
>>> -------------------------------------------------
>>> Stay out of my head, its a bad neighborhood.
>> Hi Alan,
>> I dont get your idea clearly. Please if you have any sample file give me.
>> The problem is, I put more than 1000 RGB color data in POV file. Is there a
>> way to automatically generate a long box which shows color and its
>> corresponding value. Pls give your suggestion as soon as possilble.
>>
>> Thanks a lot........
>>
>> I hope other people misunderstood my question. I am sorry if I made you all
>> in wrong direction.
>>
> If I understand you correctly, you have some software external to
> povray. This software generates a data set and assigns *itself*
> different colors to different points in the dataset. What you want
> to do is to create a scale with the same colors.
>
> If that is the case, I see two solutions:
> - If you can, have your software input a value between 0 and 1
> instead of outputting colors. It should then be possible to use a
> color_map to colorize your output. To create a scale, you would then
> create a box with a gradient texture using the same color_map;
>
> - Or (but this is *much* more difficult to get right), you can
> create several boxes (you will need eight if you have 1000
> individual colors to put on your scale). Then assign them a gradient
> texture with this kind of color_map (adjust the values as needed):
> color_map {
> [ 1 / 128 Color1 ]
> [ 1 / 128 Color2 ]
> [ 2 / 128 Color2 ]
> [ 2 / 128 Color3 ]
> [ 3 / 128 Color3 ]
> ...
> }
> (Note that each color and each value except the first and last color
> are given twice, and that they are never increased together).
> However, you should *really* look into the other solution first.
>
> Jerome
>
> PS: Doc on the color_map keyword:
> http://www.povray.org/documentation/view/3.6.1/335/
>
This just can't work in this case. You are limited to 256 entries, total, in
your color_map, texture_map, normal_map or material_map.
What you need is only a few, evenly spaced, samples of the colors used, place
them in a color_map WITHOUT any repeat values, then use that in a gradient
pattern scaled to the lenght of the bar.
--
Alain
-------------------------------------------------
The strongest reason for the people to retain the right to keep and bear
arms is, as a last resort, to protect themselves against tyranny in
government.
Thomas Jefferson
Post a reply to this message
|
![](/i/fill.gif) |