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