POV-Ray : Newsgroups : povray.advanced-users : mesh camera help needed : Re: mesh camera help needed Server Time
5 May 2024 05:09:08 EDT (-0400)
  Re: mesh camera help needed  
From: Le Forgeron
Date: 16 Oct 2015 13:43:40
Message: <5621374c$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 16/10/2015 15:09, CAD-Andi a écrit :
> Can somebody give he a hint and nudge me in the right directon as
> far as how i could achive this?
> 
> The input variables for the wikipedia formulas are "f=focal length"
> and the angle under which the "ray" hits the focal point. The
> result "r" is the distance measured from the new point on the
> projection screen to the perpendicular center from the focal point.
> All this is calculated of course in a 2D plane. To project 3D
> Points in CAD I just had to stay on this plane, rotated around the
> "optical axis" So, in a sense I work with a hybrid of kartesian and
> polar coordinates to get the point on the virtual CAD screen.
> 

Thanks you for explaining the formula.

> Anyway, any help or general thoughts on using any of these
> mathematical projection methods or even real world camera formulas
> is welcome.

Povray has a fisheye camera,

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.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJsEAQEIAAYFAlYhN0sACgkQhKAm8mTpkW3MGwP4jXQxKpMH2ogRn/54tehqTBko
gQ2dGxk99dOcE9mM2oqjA10HHj/x297SdeSQRWRcy4XWavTfNdqyO5kHpe/yMDhO
dAOCiVQu+5mjyV+wajQOdPuotlrAq5QkCCTAiKuflN/3oHTPFGVrR+SCZMpvo0bQ
04tGV2DVlY2QKE4Egg==
=FDkC
-----END PGP SIGNATURE-----


Post a reply to this message

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