POV-Ray : Newsgroups : povray.advanced-users : Help please: eval_pigment rgb expression to float : Re: Help please: eval_pigment rgb expression to float Server Time
29 Jul 2024 08:15:43 EDT (-0400)
  Re: Help please: eval_pigment rgb expression to float  
From: Marc-Hendrik Bremer
Date: 16 Aug 2002 11:48:04
Message: <3d5d1eb4@news.povray.org>
"Andrew Cocker" <mai### [at] mariner9net> schrieb im Newsbeitrag
news:3d5d1d89$1@news.povray.org...
> Hi,
>
> I'm trying to vary the size of each sphere in a 100x100 grid by sampling a
bozo pigment. I
> haven't used eval_pigment before and I'm finding that it is returning a
color expression, and
> I require a float, but I cannot work out how to convert between the two. I
am requiring a
> float in the range 0..1.
>
> Here's my code:
>
> #declare MyPigment =
> pigment {
> bozo
> scale 100
> color_map {
> [0 rgb 0]
> [1 rgb 1]
> }
> }

Well, the evaluated colorvector is 'grayscale', so you can use any component
of the vector you want. Perhaps use

Radi.x?

Hth,

Marc-Hendrik


Post a reply to this message

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