POV-Ray : Newsgroups : povray.general : RGB color Index : Re: RGB color Index Server Time
31 Jul 2024 14:32:02 EDT (-0400)
  Re: RGB color Index  
From: Alain
Date: 20 Jan 2007 11:47:02
Message: <45b24786$1@news.povray.org>
sitha nous apporta ses lumieres en ce 20-01-2007 02:02:
>> 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.
You don't need many, individualy deffined, discreet colors. A gradient use some 
set colors and interpolate smoothly from one to the next.

> Thanks a lot........

> I hope other people misunderstood my question. I am sorry if I made you all
> in wrong direction.



For the "scale" box:
union{
box{1,-1 scale<20,0.2,1>pigment{gradient x 
pigment{color_map{Some_color_map}translate -0.5*x scale 40*x}}
object{ Some_text_objects }
object{ Some_tick_marks }
}
This box should be placed in any unobstructive area you want by translating and 
possibly rotating it.
Make the color_map match the color range you use, it realy don't need to be an 
exact match. Say, pure dark blue stand for the maximum negative displacement, 
bright red is for maximum positive displacement, and white is for no 
displacement. You could then use a color_map similar to this:
color_map{[0 rgb<0,0,0.3>]// a dark blue for strong negative
	[0.2 rgb<0.2,0.2,1>]// a lighter blue for medium negative
	[0.5 rgb 1]	// white for no displacement
	[0.8 rgb<0.8,0.2,0.1>]// a red for medium positive
	[1 rgb<1,0.5,0.3>]}// bright red for strong positive
This is a sample color_map. It can contain up to 256 entries.
This sample works best for one dimentional displacement, like the elevation.
It's possible, but somewhat more complex to represent 2 dimentional 
displacement. The "scale" box will need to be square and have a gradient along 
both axis.

-- 
Alain
-------------------------------------------------
SHOPPING MATH
A man will pay $20 for a $10 item he needs.
A woman will pay $10 for a $20 item that she doesn't need.


Post a reply to this message

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