POV-Ray : Newsgroups : povray.general : Interpolation method used by POV? Server Time
29 Nov 2024 19:39:07 EST (-0500)
  Interpolation method used by POV? (Message 1 to 7 of 7)  
From: Meenal
Subject: Interpolation method used by POV?
Date: 9 Jun 2005 00:20:01
Message: <web.42a7c2e0920d391e9199eef0@news.povray.org>
Hi,

I am creating 2D projections of a 3D object by shining a light source
through it. I want projections at various angles and therefore, I rotate
the object to get different projections. The projections look good. My
question is on the kind of interpolation that POV applies while creating
the projection, i.e. when in taking a projection of ab object from a
non-orthogonal views, you get non-integer values of pixels; what and how
does POV interpolate those non-integer pixel values? To their nearest
neighbor?

Meenal


Post a reply to this message

From: Warp
Subject: Re: Interpolation method used by POV?
Date: 9 Jun 2005 00:25:55
Message: <42a7c4d2@news.povray.org>
Meenal <mee### [at] studentumassedu> wrote:
> I am creating 2D projections of a 3D object by shining a light source
> through it. I want projections at various angles and therefore, I rotate
> the object to get different projections. The projections look good. My
> question is on the kind of interpolation that POV applies while creating
> the projection, i.e. when in taking a projection of ab object from a
> non-orthogonal views, you get non-integer values of pixels; what and how
> does POV interpolate those non-integer pixel values? To their nearest
> neighbor?

  Your question is a bit unclear.

  First of all, could you explain how you think POV-Ray is doing
the "projection"? If your concept is wrong, it would be good to
know it in order to correct the misconception.

-- 
                                                          - Warp


Post a reply to this message

From: Meenal
Subject: Re: Interpolation method used by POV?
Date: 9 Jun 2005 01:00:00
Message: <web.42a7cbb0b5d3c0c69199eef0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Meenal <mee### [at] studentumassedu> wrote:
> > I am creating 2D projections of a 3D object by shining a light source
> > through it. I want projections at various angles and therefore, I rotate
> > the object to get different projections. The projections look good. My
> > question is on the kind of interpolation that POV applies while creating
> > the projection, i.e. when in taking a projection of ab object from a
> > non-orthogonal views, you get non-integer values of pixels; what and how
> > does POV interpolate those non-integer pixel values? To their nearest
> > neighbor?
>
>   Your question is a bit unclear.
>
>   First of all, could you explain how you think POV-Ray is doing
> the "projection"? If your concept is wrong, it would be good to
> know it in order to correct the misconception.
>
> --
>                                                           - Warp

When I shine a light through an object, and then render the image, I get a
2D image. This image is a black and white image with white being the pixels
where the objects are. My question is that how does POV decide what pixels
will be white and what will be black? Say that a part of an object does not
completely cover an entire pixel - what is the value of the pixel
considered to be? Is the pixel interpolated to its nearest neighbor - i.e.
say morethan half of a pixel is occupied by an object, will the entire
pixel be considered an object? How does POV deal with parts of pixels? How
does it interpolate those?

Meenal


Post a reply to this message

From: Warp
Subject: Re: Interpolation method used by POV?
Date: 9 Jun 2005 02:27:09
Message: <42a7e13d@news.povray.org>
Meenal <mee### [at] studentumassedu> wrote:
> When I shine a light through an object, and then render the image, I get a
> 2D image. This image is a black and white image with white being the pixels
> where the objects are. My question is that how does POV decide what pixels
> will be white and what will be black? Say that a part of an object does not
> completely cover an entire pixel - what is the value of the pixel
> considered to be? Is the pixel interpolated to its nearest neighbor - i.e.
> say morethan half of a pixel is occupied by an object, will the entire
> pixel be considered an object? How does POV deal with parts of pixels? How
> does it interpolate those?

  Your description of lights shining through objects, projecting them
(onto other objects perhaps?) was quite confusing.

  If I understood correctly you just want to know that when an object
is rendered on screen, how the pixels are colored if, for example, the
edge of the object only partially covers a pixel.

  When not using antialiasing rays are traced through the center of the
pixel. If the ray hits the object then the pixel is colored accordingly.
If the ray does not hit the object then it will be colored according
to what's behind it (eg. the background).

  If you want a better result you have to turn antialiasing on. This
causes POV-Ray to shoot more rays in such cases and average the result.

-- 
                                                          - Warp


Post a reply to this message

From: Florian Brucker
Subject: Re: Interpolation method used by POV?
Date: 9 Jun 2005 11:20:58
Message: <42a85e5a$1@news.povray.org>
What you want to do could perhaps be done more easily with the object
pattern. See http://povray.org/documentation/view/3.6.1/386/ for its
documentation.


HTH,
Florian
-- 
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/


Post a reply to this message

From: Meenal
Subject: Re: Interpolation method used by POV?
Date: 9 Jun 2005 20:40:01
Message: <web.42a8e061b5d3c0c69199eef0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Meenal <mee### [at] studentumassedu> wrote:
> > When I shine a light through an object, and then render the image, I get a
> > 2D image. This image is a black and white image with white being the pixels
> > where the objects are. My question is that how does POV decide what pixels
> > will be white and what will be black? Say that a part of an object does not
> > completely cover an entire pixel - what is the value of the pixel
> > considered to be? Is the pixel interpolated to its nearest neighbor - i.e.
> > say morethan half of a pixel is occupied by an object, will the entire
> > pixel be considered an object? How does POV deal with parts of pixels? How
> > does it interpolate those?
>
>   Your description of lights shining through objects, projecting them
> (onto other objects perhaps?) was quite confusing.
>
>   If I understood correctly you just want to know that when an object
> is rendered on screen, how the pixels are colored if, for example, the
> edge of the object only partially covers a pixel.
>
>   When not using antialiasing rays are traced through the center of the
> pixel. If the ray hits the object then the pixel is colored accordingly.
> If the ray does not hit the object then it will be colored according
> to what's behind it (eg. the background).
>
>   If you want a better result you have to turn antialiasing on. This
> causes POV-Ray to shoot more rays in such cases and average the result.
>
> --
>                                                           - Warp




Say I create a box in POV. Then I rotate this box about the x-axis by 63
degrees and the y axis by 72 degrees and then render the image. How will
the pixels in the image be colored off? The box will project onto parts of
some pixels. So if the box projects onto half or more of the pixel, it will
be colored off, and if it projects onto less than half of a pixel it will
not be colored off? Is that how it works?

Meenal


Post a reply to this message

From: Warp
Subject: Re: Interpolation method used by POV?
Date: 10 Jun 2005 00:08:53
Message: <42a91255@news.povray.org>
Meenal <mee### [at] studentumassedu> wrote:
> Say I create a box in POV. Then I rotate this box about the x-axis by 63
> degrees and the y axis by 72 degrees and then render the image. How will
> the pixels in the image be colored off? The box will project onto parts of
> some pixels. So if the box projects onto half or more of the pixel, it will
> be colored off, and if it projects onto less than half of a pixel it will
> not be colored off? Is that how it works?

  Objects are not projected onto the screen. Rays are sent from the
screen towards the scene.

  As I already said, if the object covers the middle of the pixel,
the pixel will be colored according to the box, else to the background.

-- 
                                                          - Warp


Post a reply to this message

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