

Thomas de Groot <tho### [at] degrootorg> wrote:
> I am a regular user of Doctor John's FieldCam macro which enables
> slanting architecture to look straight. It simulates the professional
> cameras where this adjustment can be done through the lenses.
I think it's actually accomplished using the adjustable film plane of the view
camera.
The 3book series on negative, print, and camera by Ansel Adams ought to
describe it fully and clearly.
<hint> One might think there are PDF's of those available... ;) </hint>
> The macro works perfectly... as long as your scene camera is situated
> about the origin of the Yaxis. Recently, I have been working on scenes
> where the camera is situated at about y=170.00, and strange things
> happen: the camera is moved upwards and forwards, the more so as
> elevation gets greater.
Is this a custom version that you edited yourself, or a later version of the
original?
All I found was this:
http://news.povray.org/povray.text.scenefiles/thread/%3Cweb.3e0c736a1f1273cdb29393de0%40news.povray.org%3E/
I'm puzzled by this:
#local VCorr = pow(vlength(CD), 2)/pow(HypoXZ, 2);
and its use in the matrix. Seems to be some longwinded way to compute y^2 or a
multiple of it....
Maybe try
#local VCorr = CP.y; ? Totally guessing.
> To illustrate this, I have attached a little test scene and an image
> showing the problem. H is the value for the elevation of the scene
> elements along the Yaxis.
I don't really understand what I'm looking at in the scene, nor how the macro
corrects the one column and not the others...
> I can correct this by adding a translate after the "NoFall" transform in
> the camera code, but I assume that this could better be done within the
> "NoFall" matrix. I have not the slightest idea how to do this.
shear matrix:
http://www.flohmueller.de/pov_tut/trans/trans_450e.htm
The matrix just ... "corrects" the basis vectors of the world space that the
camera uses.
If you look at the thread that jr references:
http://news.povray.org/povray.binaries.misc/thread/%3Cweb.5c226659252b677e48892b50%40news.povray.org%3E/
we explain that the POVRay matrix keyword uses a proper 3x3 mathematical matrix
with an additional 1x3 translation matrix "bolted on"to the bottom.
So for
ABC
DEF
GHI
you have rowwise definitions of the basis vectors i, j, k (x, y, z) of the
world space.
So
ABC = <1, 0, 0> = x
DEF = <0, 1, 0> = y
GHI = <0, 0, 1> = z
and then you tack on a translate <x, y, z> to the bottom of that.
So, quick and dirty answer, to address moving your correctional translation to
the matrix would be (I think)
matrix <1, 0, 0, 0, 1, 0, 0, 0, 1, 0, CP.y, 0>
Doctor John has some mathematical hocus pocus going in with his squared terms,
and what assumptions he makes and why is currently beyond my ken, but perhaps at
some point when I return to having the time and energy to muck around with
POVRay stuff, I will puzzle it out.
I'm not sure what the Vcorr does, but I guess it is doing it... wrong?
That's all I've got  for now.
Bill
Post a reply to this message

