POV-Ray : Newsgroups : povray.general : Stereo Rendering? : Re: Stereo Rendering? Server Time
8 Aug 2024 01:19:06 EDT (-0400)
  Re: Stereo Rendering?  
From: James Tonkin
Date: 15 Jun 2001 14:09:24
Message: <3b2a4f54$1@news.povray.org>
>>
>>  |    |
>>  |    |
>>  \-\/-/
>>    ||
>>    __
>
>
>    When I do that, I get a single image in the center, which
>experimentation reveals is both halves joined in the middle.

Ok, time for some physics...; let's just consider the right-hand image.

The ray that corresponds to the left side of the camera leaves in the +y
direction.  It reflects off the first mirror, and is now travelling <1,0>
It reflects from the second mirror, and is now travelling <0,1>.

I.e The left-hand edge of the right-hand image is the view dead ahead.

For a stereo image, if your angle of view is theta degrees, then you want
the left side of the right hand image to correspond to <0,1> rotated by
<- theta/2 degrees>.

Now consider the right side of the image.  With your mirror arrangement,
the ray leaves the camera at <sin(theta/2), cos(theta/2)>.  After the double
reflection, it'll leave the second mirror at that same angle.  So this ends
up at the right angle, although there is a bit of distortion introduced by
the fact that the right edge of the mirror is further away than the left edge.

What you want to have happen is that the mirror combo should reflect the
left-hand edge of the right-hand image to an angle of <-sin(theta/2), 
cos(theta/2)>; the right hand edge of the image to an angle of <+sin(th/2),
cos(th/2)>;  This is equivalent to the center of the right hand image 
looking dead ahead.

I.e. camera angle <+sin (theta/4), cos(theta/4)> gets reflected to <0,1>

Actually doing the math is fairly simple, but I don't happen to know what
the field of view for a standard camera is, so I can't run the numbers 
for you.

As a side note, If you use an arrangement more like:

    |
    |
/   |
||  |
| | |
|  ||
e   /

You'll have less distortion, because the difference in beam-length to the
different sides of the mirror will be less (although the total beam-length
will be longer)

Jamie


Post a reply to this message

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