POV-Ray : Newsgroups : povray.newusers : getting the world coordinate (x,y,z) of apixel Server Time
1 Nov 2024 09:21:09 EDT (-0400)
  getting the world coordinate (x,y,z) of apixel (Message 1 to 3 of 3)  
From: shimon a10
Subject: getting the world coordinate (x,y,z) of apixel
Date: 14 Jan 2006 12:05:01
Message: <web.43c92e281fd85402981d861f0@news.povray.org>
hi,

I'm a beginner at PovRay,  and i wanted to ask:

1. I'm making an image by making Box,plane,etc, and putting the camera in
   somewhare at world coordinte.
2. I wanted to know how to relate an arbirary pixel in the image to the
   world coordinate (x,y,z) that it's see.
3. If it possible to write me the prcedure.
4. please answer me in detail.
5. Lots of thanks.

shimon


Post a reply to this message

From: Chris B
Subject: Re: getting the world coordinate (x,y,z) of apixel
Date: 16 Jan 2006 09:35:48
Message: <43cbaf44$1@news.povray.org>
"shimon_a10" <shi### [at] wallacoil> wrote in message 
news:web.43c92e281fd85402981d861f0@news.povray.org...
> hi,
>
> I'm a beginner at PovRay,  and i wanted to ask:
>
> 1. I'm making an image by making Box,plane,etc, and putting the camera in
>   somewhare at world coordinte.
> 2. I wanted to know how to relate an arbirary pixel in the image to the
>   world coordinate (x,y,z) that it's see.
> 3. If it possible to write me the prcedure.
> 4. please answer me in detail.
> 5. Lots of thanks.
>
> shimon
>

Hi Shimon,

The default camera is a perspective camera that acts like a pinhole camera. 
The image is constructed by tracing straight lines from the point of the 
pinhole (the position of the camera) through points on the image plane and 
on until they hit something (or not). The image plane is perpendicular to 
the direction the camera is looking in, which is controlled by the camera 
definition. The distance from the camera is defined by the direction vector 
and defaults to 1.

This is explained more comprehensively (with a diagram) in section '3.3.1 
Camera' of the POV-Ray help files.

So for a given pixel and a known camera definition you can calculate the 
equation of the line along which the ray was traced, but, from the image 
pixels you can't determine the point along that line at which it intersected 
an object (if that's what you're asking in 2.)

Chris B.


Post a reply to this message

From: Chris B
Subject: Re: getting the world coordinate (x,y,z) of apixel
Date: 16 Jan 2006 09:41:56
Message: <43cbb0b4$1@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message 
news:43cbaf44$1@news.povray.org...
>
> "shimon_a10" <shi### [at] wallacoil> wrote in message 
> news:web.43c92e281fd85402981d861f0@news.povray.org...
>> hi,
>>
>> I'm a beginner at PovRay,  and i wanted to ask:
>>
>> 1. I'm making an image by making Box,plane,etc, and putting the camera in
>>   somewhare at world coordinte.
>> 2. I wanted to know how to relate an arbirary pixel in the image to the
>>   world coordinate (x,y,z) that it's see.
>> 3. If it possible to write me the prcedure.
>> 4. please answer me in detail.
>> 5. Lots of thanks.
>>
>> shimon
>>
>
> Hi Shimon,
>
> The default camera is a perspective camera that acts like a pinhole 
> camera. The image is constructed by tracing straight lines from the point 
> of the pinhole (the position of the camera) through points on the image 
> plane and on until they hit something (or not). The image plane is 
> perpendicular to the direction the camera is looking in, which is 
> controlled by the camera definition.

> The distance from the camera is defined by the direction vector and 
> defaults to 1.

I should have said 'The distance of the image plane from the camera is equal 
to the length of the direction vector which is equal to 1 when using the 
default direction vector'.

>
> This is explained more comprehensively (with a diagram) in section '3.3.1 
> Camera' of the POV-Ray help files.
>
> So for a given pixel and a known camera definition you can calculate the 
> equation of the line along which the ray was traced, but, from the image 
> pixels you can't determine the point along that line at which it 
> intersected an object (if that's what you're asking in 2.)
>
> Chris B.
>


Post a reply to this message

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