|
![](/i/fill.gif) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alain wrote:
>> -----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.
That's why I said he needed *eight* boxes.
> 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.
>
This won't work if he can't control the colors taken by the data
and if he needs an accurate scale bar. However, you'll notice that
it is the first solution I suggested and the one I recommended he
look into first.
Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
| mailto:jeb### [at] free fr | ICQ: 238062172 |
| http://jeberger.free.fr/ | Jabber: jeb### [at] jabber fr |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFsy5qd0kWM4JG3k8RAjoWAKCo2WzTnrSt0B2jjdmTv/w4bD6HVwCgkp7A
jg1Z3hO9LDxRgPjE8Qko3FA=
=+6Ku
-----END PGP SIGNATURE-----
Post a reply to this message
|
![](/i/fill.gif) |