POV-Ray : Newsgroups : povray.advanced-users : Making color legend Server Time
5 Jul 2024 15:29:34 EDT (-0400)
  Making color legend (Message 1 to 7 of 7)  
From: sitha
Subject: Making color legend
Date: 22 May 2007 02:40:02
Message: <web.46528fc8fd45f3f74ac3566b0@news.povray.org>
Hi All,
I want to make a color legend for following my application.
My application is, I make a cube with different color faces, which colors
correspond to the force acting on them.
This color set up shows x,y,z direction forces.

texture{pigment{rgb <  2 ,  2 , 2 > }}

Now my problem I should put a color legend which shows the color and force
relation.

Is it possible make automatically in POV-ray?
If not how can I do the above job? Please help me........

Thanks a lot in adavnce.

Rgds,
Sitha.


Post a reply to this message

From: Tim Attwood
Subject: Re: Making color legend
Date: 22 May 2007 05:01:08
Message: <4652b154$1@news.povray.org>
> I want to make a color legend for following my application.
> My application is, I make a cube with different color faces, which colors
> correspond to the force acting on them.

Is this intended to be an animation?
Is the data generated by some other program?
For now I'll assume you want a still, and the
data is generated inside pov.

> This color set up shows x,y,z direction forces.
>
> texture{pigment{rgb <  2 ,  2 , 2 > }}

Color in pov normally varies from 0 to 1.
POV has the ability to use splines to interpolate between
vectors, and color is just another vector.
Example...

#declare CMap = spline {
   linear_spline
   0.0, <0,0,1> //blue
   0.33,<0,1,0> //green
   0.66,<1,1,0> //yellow
   1.0, <1,0,0> //red
};

Which can then be used as your pigment.
pigment { color CMap(Xforce) }

> Now my problem I should put a color legend which shows the color and force
> relation.

It sounds like you want a gradient pigment, and some text labels.

Example...
union {
 box {<0,0,0>,<1,0.2,0.001>
   pigment {
      gradient x
      color_map {
         [0 Blue]
         [0.33 Green]
         [0.66 Yellow]
         [1 Red]
      }
      translate <-0.001,0,0>
   }
   scale <1.5,1,1>
 }
 text {
    ttf "timrom.ttf" "0" 0.05, 0
    pigment { White}
    scale 0.2
    translate <0.04,0.04,-0.01>
 }
 text {
    ttf "timrom.ttf" "1" 0.05, 0
    pigment { White}
    scale 0.2
    translate <1.4,0.04,-0.01>
 }
 translate <0.2,-1,-0.1>
}

> Is it possible make automatically in POV-ray?
Pov doesn't have a built in legend function, you'll
need to reposition your legend object if you move the
camera.

> If not how can I do the above job? Please help me........
However, with a little math it's possible to
place an object to look like it is in the same spot
in relation to the camera.


Post a reply to this message

From: Stephen
Subject: Re: Making color legend
Date: 22 May 2007 05:25:02
Message: <web.4652b66fb27d7bb9c4e49fa40@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:

> > Is it possible make automatically in POV-ray?
> Pov doesn't have a built in legend function, you'll
> need to reposition your legend object if you move the
> camera.
>

There is screen.inc
POV-Ray 3.6 Documentation Online View - 2.7.20.3 screen.inc
Screen.inc will enable you to place objects and textures right in front of
the camera. When you move the camera, the objects placed with screen.inc
will follow the movement and stay in the same position on the screen.


Post a reply to this message

From: sitha
Subject: Re: Making color legend
Date: 22 May 2007 22:50:02
Message: <web.4653ab94b27d7bb94ac3566b0@news.povray.org>
Dear Tim,
Thank you very much for your help. I hope your idea will help me very much.

Thanks a lot again.

Rgds,
Sitha.


Post a reply to this message

From: sitha
Subject: Re: Making color legend
Date: 22 May 2007 22:55:01
Message: <web.4653ac81b27d7bb94ac3566b0@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> wrote:

> There is screen.inc
> POV-Ray 3.6 Documentation Online View - 2.7.20.3 screen.inc
> Screen.inc will enable you to place objects and textures right in front of
> the camera. When you move the camera, the objects placed with screen.inc
> will follow the movement and stay in the same position on the screen.


Dear Stephen,
I dont understand your explanation. Do you mean that POV has in built
function to make legend?

Rgds,
Sitha.


Post a reply to this message

From: sitha
Subject: Re: Making color legend
Date: 22 May 2007 22:55:02
Message: <web.4653acecb27d7bb94ac3566b0@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> wrote:

>
> There is screen.inc
> POV-Ray 3.6 Documentation Online View - 2.7.20.3 screen.inc
> Screen.inc will enable you to place objects and textures right in front of
> the camera. When you move the camera, the objects placed with screen.inc
> will follow the movement and stay in the same position on the screen.

Sorry Stephen I misunderstood your explanation. Now I got your idea.

Thanks a lot.

Rgds,
Sitha.


Post a reply to this message

From: Stephen
Subject: Re: Making color legend
Date: 23 May 2007 05:30:01
Message: <web.46540934b27d7bb9b3e3af320@news.povray.org>
"sitha" <nsi### [at] excitecom> wrote:
> "Stephen" <mcavoys_AT_aolDOT.com> wrote:
>
> >
> > There is screen.inc
> > POV-Ray 3.6 Documentation Online View - 2.7.20.3 screen.inc
> > Screen.inc will enable you to place objects and textures right in front of
> > the camera. When you move the camera, the objects placed with screen.inc
> > will follow the movement and stay in the same position on the screen.
>
> Sorry Stephen I misunderstood your explanation.

Join the club you are not the only one :-)

> Now I got your idea.
>


animation.


Post a reply to this message

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