POV-Ray : Newsgroups : povray.general : Angle and panoramic projection : Re: Angle and panoramic projection Server Time
11 Aug 2024 03:31:04 EDT (-0400)
  Re: Angle and panoramic projection  
From: Gerald K  Dobiasovsky
Date: 18 Sep 1999 18:25:49
Message: <37e4116d@news.povray.org>
Ron Parker <par### [at] fwicom> wrote:
> On Thu, 16 Sep 1999 14:21:50 -0700, Ken wrote:
> >
> >
> >Ron Parker wrote:
> >
> >> How it's supposed to work, I don't know.
> >
> >Pov docs say:

<snip...>

> Yes, I know what the docs say.  But what do they mean? :)  Which
> viewing angle is one setting?  what does it mean by "a type" of
> cylindrical projection?
>
> I suspect that the code just forgets to multiply x0 and y0 by
> angle/180, but I'm not 100% sure of that.
>

Perhaps this has been a misunderstanding between the person who wrote
the doc and the one who wrote the code?

The code seems to have been set up for a fixed horizontal angle of
180 degrees from the onset (watch how x0 is initialized from 0.0 to 1.0
instead of -0.5 to 0.5 as in, i.e., the cylindrical camera #1;
so the horizontal angle is measured from FCR, the right vector,
not relative to FCD, the direction vector; to get a variable horizontal
angle symmetric to FCD one would have to change this, too).

And the type of projection?

At the end of the panoramic routine FCD is multiplied by sin(x0),
FCR by cos(x0), FCU by tan(y0).

We can get rid of the tangens by scaling the vector by cos(y0),
getting
            FCD*sin(x0)*cos(y0),
            FCR*cos(x0)*cos(y0),
            FCU*sin(y0),
which is, keeping in mind from where the horizontal angle is starting
(and if  I'm not entirely in error about all this), a spherical projection.

Gerald


Post a reply to this message

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