POV-Ray : Newsgroups : povray.advanced-users : mesh camera help needed : Re: mesh camera help needed Server Time
5 May 2024 13:14:13 EDT (-0400)
  Re: mesh camera help needed  
From: Le Forgeron
Date: 19 Dec 2015 07:15:50
Message: <56754a76@news.povray.org>
Le 21/10/2015 16:02, Le_Forgeron a écrit :
> Le 19/10/2015 13:29, CAD-Andi a écrit :
>>
>>> http://wiki.povray.org/content/Reference:Camera
>>>
>>> If I got it right from the code (tracepixel.cpp), the fisheye of
>>> povray is wikipedia orthographic : r = f.sin(theta).
>>> (in the code of povray, the computation is done the opposite way: you

>>> start with r (named rad), compute theta (named phi) and use that phi
>>> as the angle of the ray from the focal axis.
>>>
>>
>> Thanks for confirming that POVRay's fisheye is in wiki orthographic. I

>> was
>> wondering what projection method was beeing used. Thanks!
>>
> 
> Ok, two points, now that I analysed the povray's fisheye code.
> 
> 1. It's well a wiki orthographic mapping (so I was correct on that).
> 
> 2. phi in code is the rotation around the direction axis (so it is not
> theta), theta is the late y0 value. (as long as you use unit vectors fo
r
> the up & right vectors of the camera, the mapping is r = F.sin(theta)
 )

And I got dirt, mud and beers in the eyes, or behind.

The fisheye camera of povray is not orthographic, it is equidistant
( r = F.theta , as y0 (which is theta) is linear to rad. )

The fact that y0 is used later to compute the cy and sy is irrelevant,
it's just the construction of the vector in 3D.

Attached various fisheye renderings.


Post a reply to this message


Attachments:
Download 'equisolid.png' (162 KB) Download 'fisheye.png' (158 KB) Download 'orthographic.png' (171 KB) Download 'stereographic.png' (151 KB)

Preview of image 'equisolid.png'
equisolid.png

Preview of image 'fisheye.png'
fisheye.png

Preview of image 'orthographic.png'
orthographic.png

Preview of image 'stereographic.png'
stereographic.png


 

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