POV-Ray : Newsgroups : povray.general : Re: Pespective Camera do not give the result I wished. Server Time
4 Nov 2024 19:18:57 EST (-0500)
  Re: Pespective Camera do not give the result I wished. (Message 1 to 4 of 4)  
From: Christoph Hormann
Subject: Re: Pespective Camera do not give the result I wished.
Date: 1 Nov 2003 08:12:02
Message: <gnnc71-los.ln1@triton.imagico.de>
Fab wrote:
> Hello !
> 
> I have a problem with perspective camera.
> 
> 
> - I use the following code for an image of 400x400 pixels.
> - I wish to get a cylinder in the middle of my image just like the image I
> sent.

Please don't post attachments in this group.

Apart from that you did not make it clear what you are trying to 
achieve.  If you want the cylinder to fill your whole image the radius 
has to be the same as the distance to the camera if the camera angle is 
90 degree.  If your radius is 250 and the distance from the camera 500 
(it's only 499 in your sample) the cylinder fills half the width of the 
image.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Fab
Subject: Re: Pespective Camera do not give the result I wished.
Date: 1 Nov 2003 08:53:12
Message: <3fa3bac8$1@news.povray.org>
> If you want the cylinder to fill your whole image the radius
> has to be the same as the distance to the camera if the camera angle is
> 90 degree.  If your radius is 250 and the distance from the camera 500
> (it's only 499 in your sample) the cylinder fills half the width of the
> image.

ok. but it is exactly what I do not understand.

in optic, if the radius is 250, the cylinder should NOT fills half the width
of the image.

if I wished to fill half of the image, I need a radius of   tan ( 90 / 4 ) *
499
and that's not the case with povray.

And my question is : Why isn'it like in optic with povray ?

( I need to use povray to build an scientific application but the
perspective camera does not work like it should.... or I do not understand
how it works.. )


Post a reply to this message

From: Christopher James Huff
Subject: Re: Pespective Camera do not give the result I wished.
Date: 1 Nov 2003 10:12:31
Message: <cjameshuff-B9D46A.10122301112003@netplex.aussie.org>
In article <3fa3bac8$1@news.povray.org>,
 "Fab" <--fab### [at] u-picardiefr--> wrote:

> in optic, if the radius is 250, the cylinder should NOT fills half the width
> of the image.
> 
> if I wished to fill half of the image, I need a radius of   tan ( 90 / 4 ) *
> 499
> and that's not the case with povray.

I think you're misunderstanding the projection or the math. What you are 
doing is projecting a 2D plane (that of the end of the cylinder) onto 
another 2D plane (the image plane) through a pinhole camera. If you 
double the radius of the cylinder, the apparent radius of the cylinder 
will double. The radius you need to fill the image is tan(90/2)*499, 
which happens to be 499. To fill half the image, you need 
tan(90/2)*499/2.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Pespective Camera do not give the result I wished.
Date: 1 Nov 2003 11:32:01
Message: <1n3d71-6jj.ln1@triton.imagico.de>
Fab wrote:
>>If you want the cylinder to fill your whole image the radius
>>has to be the same as the distance to the camera if the camera angle is
>>90 degree.  If your radius is 250 and the distance from the camera 500
>>(it's only 499 in your sample) the cylinder fills half the width of the
>>image.
> 
> 
> ok. but it is exactly what I do not understand.
> 
> in optic, if the radius is 250, the cylinder should NOT fills half the width
> of the image.
> 
> if I wished to fill half of the image, I need a radius of   tan ( 90 / 4 ) *
> 499
> and that's not the case with povray.
> 
> And my question is : Why isn'it like in optic with povray ?

POV-Ray is completely correct here.  Just draw it on a piece of paper 
and you will see.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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