> Rune wrote:
>> I'd simply say:
>>
>> #local W = image_width/sqrt(image_height*image_width);
>> #local H = image_height/sqrt(image_height*image_width);
>>
>> // in the camera definition use:
>> right x*W
>> up y*H // or z*H if Z is up
>>
>> Rune
>
> Why the square root? Why not simply:
> up y // or z
> right x * image_width / image_height
>
> Or
> up y * image_height
> right x * image_width
>
> The actual length of the vectors doesn't matter since he used angle
> afterwards.
I screwed a bit up in my previous message. Here is what I meant:
If you want an automatic adjustment for image ratio that doesn't prioritize
either horizontal or vertical angle, you can use:
#declare Zoom = 1.0;
up y*sqrt(image_height/image_width)/Zoom
right x*sqrt(image_width/image_height)/Zoom
This will for example have the effect that if you switch the width and
height of the image, it will be like if you rotated a real camera 90
degrees: the area will be the same.
Remember though that the effect will be overruled if the angle keyword is
used.
Rune
--
http://runevision.com
Post a reply to this message
|