POV-Ray : Newsgroups : povray.binaries.images : -Another- RSOCP variation (217kB jpeg) : Re: -Another- RSOCP variation (217kB jpeg) Server Time
2 Aug 2024 20:20:31 EDT (-0400)
  Re: -Another- RSOCP variation (217kB jpeg)  
From: Rune
Date: 19 Jun 2007 17:41:54
Message: <46784da2$1@news.povray.org>

> 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

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