POV-Ray : Newsgroups : povray.general : Angle and panoramic projection Server Time
11 Aug 2024 05:21:17 EDT (-0400)
  Angle and panoramic projection (Message 1 to 8 of 8)  
From: Margus Ramst
Subject: Angle and panoramic projection
Date: 16 Sep 1999 17:01:04
Message: <37E15A64.17684872@peak.edu.ee>
It seems angle has no effect with panoramic projection (at least ver 3.1g and
Superpatch 3.1e codebase).
Is my observation correct? Is it a bug?
Example code:

camera{panoramic location <0,1,-6> angle 300 look_at 0}
light_source{<10,10,-20> color 1}

box{-1,1 pigment{rgb 1}}
box{-1,1 pigment{rgb 1} translate -x*4}
box{-1,1 pigment{rgb 1} translate x*4}
plane{y,-1 pigment{rgb .7}}


Post a reply to this message

From: Ken
Subject: Re: Angle and panoramic projection
Date: 16 Sep 1999 17:12:09
Message: <37E15CBA.A03513F4@pacbell.net>
Margus Ramst wrote:
> 
> It seems angle has no effect with panoramic projection (at least ver 3.1g and
> Superpatch 3.1e codebase).
> Is my observation correct? Is it a bug?
> Example code:
> 
> camera{panoramic location <0,1,-6> angle 300 look_at 0}
> light_source{<10,10,-20> color 1}
> 
> box{-1,1 pigment{rgb 1}}
> box{-1,1 pigment{rgb 1} translate -x*4}
> box{-1,1 pigment{rgb 1} translate x*4}
> plane{y,-1 pigment{rgb .7}}

Pov docs say:
Panoramic projection: This projection is called "cylindrical equirectangular
projection". It overcomes the degeneration problem of the perspective
projection if the viewing angle approaches 180 degrees. It uses a type
of cylindrical projection to be able to use viewing angles larger than
180 degrees with a tolerable lateral-stretching distortion. The angle
keyword is used to determine the viewing angle. 

I say:
I can see no difference when a different angle is specified.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ron Parker
Subject: Re: Angle and panoramic projection
Date: 16 Sep 1999 17:20:15
Message: <37e15f0f@news.povray.org>
On Fri, 17 Sep 1999 00:00:20 +0300, Margus Ramst wrote:
>It seems angle has no effect with panoramic projection (at least ver 3.1g and
>Superpatch 3.1e codebase).
>Is my observation correct? Is it a bug?

The code appears to fix the angle at 180 degrees wide and 90 degrees high,
ignoring the angle.  How it's supposed to work, I don't know.

Have you tried ultra_wide_angle?


Post a reply to this message

From: Ken
Subject: Re: Angle and panoramic projection
Date: 16 Sep 1999 17:23:40
Message: <37E15F6E.38B37827@pacbell.net>
Ron Parker wrote:

> How it's supposed to work, I don't know.

Pov docs say:
  Panoramic projection: This projection is called "cylindrical
equirectangular projection". It overcomes the degeneration problem
of the perspective projection if the viewing angle approaches 180
degrees. It uses a type of cylindrical projection to be able to use
viewing angles larger than 180 degrees with a tolerable lateral-
stretching distortion. The angle keyword is used to determine the
viewing angle.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ron Parker
Subject: Re: Angle and panoramic projection
Date: 16 Sep 1999 17:28:01
Message: <37e160e1@news.povray.org>
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:
>  Panoramic projection: This projection is called "cylindrical
>equirectangular projection". It overcomes the degeneration problem
>of the perspective projection if the viewing angle approaches 180
>degrees. It uses a type of cylindrical projection to be able to use
>viewing angles larger than 180 degrees with a tolerable lateral-
>stretching distortion. The angle keyword is used to determine the
>viewing angle.

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.


Post a reply to this message

From: Ken
Subject: Re: Angle and panoramic projection
Date: 16 Sep 1999 17:37:14
Message: <37E1629B.8319280D@pacbell.net>
Ron Parker wrote:

> 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?

Sorry Ron - my twisted sense of humor again.

  Rearrange the camera statement thusly and it works as advertized
- up to a point:

Before > camera{panoramic location <0,.1,-6> angle 160 look_at 0  }
Now ---> camera{location <0,.1,-6> angle 160 look_at 0 panoramic }

Only problem with this change is that when you specify an angle larger
than 180 an error is returned warning you to specify  an angle of less
than 180 which seems to be in conflict with what the docs say.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Margus Ramst
Subject: Re: Angle and panoramic projection
Date: 17 Sep 1999 06:43:17
Message: <37E21B2F.3C1868FD@peak.edu.ee>
Ron Parker wrote:
> 
> Have you tried ultra_wide_angle?

Yes, and neither will really do, due to the distortion of straight lines
at large angles. OTOH, the standard camera gives distorted
perspective...
Anyway, it was just an observation.

Margus


Post a reply to this message

From: Gerald K  Dobiasovsky
Subject: Re: Angle and panoramic projection
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.