POV-Ray : Newsgroups : povray.general : Determining color Server Time
26 Dec 2024 00:34:56 EST (-0500)
  Determining color (Message 1 to 4 of 4)  
From: Ger
Subject: Determining color
Date: 11 Apr 2006 11:57:51
Message: <443bd1ff@news.povray.org>
Is it possible to read the color of a certain point in an image_map?

Iow, I have an image_map mapped onto a box and I would like to know what the
color is when I do a trace() from a point over the box


-- 
Ger


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Determining color
Date: 11 Apr 2006 12:10:00
Message: <web.443bd477b65c6c1a6c4803960@news.povray.org>
Ger <No.### [at] ThankYou> wrote:
> Is it possible to read the color of a certain point in an image_map?
>
> Iow, I have an image_map mapped onto a box and I would like to know what the
> color is when I do a trace() from a point over the box
>
>
> --
> Ger

Make a function of the image map and evaluate the function.

#local PIMAGE = function {
pigment{image_map {IMAGEMAP}
 TRANSFORM //scale, translate and rotate to appropriate postion
}

#declare COL=PIMAGE(x,y,z);


-tgq


Post a reply to this message

From: Ger
Subject: Re: Determining color
Date: 11 Apr 2006 12:52:14
Message: <443bdebe@news.povray.org>
Trevor G Quayle wrote:

> Ger <No.### [at] ThankYou> wrote:
>> Is it possible to read the color of a certain point in an image_map?
>>
>> Iow, I have an image_map mapped onto a box and I would like to know what
>> the color is when I do a trace() from a point over the box
>>
>>
>> --
>> Ger
> 
> Make a function of the image map and evaluate the function.
> 
> #local PIMAGE = function {
> pigment{image_map {IMAGEMAP}
>  TRANSFORM //scale, translate and rotate to appropriate postion
> }
> 
> #declare COL=PIMAGE(x,y,z);
> 
> 
> -tgq

Works. Thanks.
-- 
Ger


Post a reply to this message

From: Chris B
Subject: Re: Determining color
Date: 11 Apr 2006 14:46:28
Message: <443bf984$1@news.povray.org>
"Ger" <No.### [at] ThankYou> wrote in message news:443bdebe@news.povray.org...
> Trevor G Quayle wrote:
>
>> Ger <No.### [at] ThankYou> wrote:
>>> Is it possible to read the color of a certain point in an image_map?
>>>
>>> Iow, I have an image_map mapped onto a box and I would like to know what
>>> the color is when I do a trace() from a point over the box
>>>
>>>
>>> --
>>> Ger
>>
>> Make a function of the image map and evaluate the function.
>>
>> #local PIMAGE = function {
>> pigment{image_map {IMAGEMAP}
>>  TRANSFORM //scale, translate and rotate to appropriate postion
>> }
>>
>> #declare COL=PIMAGE(x,y,z);
>>
>>
>> -tgq
>
> Works. Thanks.
> -- 
> Ger

Hi Ger,

You may also wish to take a look at the 'eval_pigment' predefined function 
as a possible alternative

Regards,
Chris B.


Post a reply to this message

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