POV-Ray : Newsgroups : povray.advanced-users : Image that knows its own size? : Re: Image that knows its own size? Server Time
29 Jul 2024 18:17:47 EDT (-0400)
  Re: Image that knows its own size?  
From: Mike Williams
Date: 2 Apr 2001 21:47:20
Message: <hQpDpHApsSy6Ewk6@econym.demon.co.uk>
Wasn't it Francois Labreque who wrote:
>Is there a way for a .pov to know at what size it's being rendered?
>
>I'm currently constantly switching from 320*240 to 600*600 to 1200*1500
>for a project I'm working on and I keep forgetting to change my up and
>right vectors...
>
>Someone help me being lazy.

You can do it in MegaPOV, but not (yet) in official PovRAY. The doc says

  9.8. Image size keywords

  Author: Smellenbergh

  Two new keywords have been added so that the image size given in the   
  rendering options can be used in your scene source

  image_width //reads the +Wn value
  image_height //reads the +Hn value

  When using those keywords to set the camera ratio (up and right 
  vectors) the viewing angle of the camera will always cover the full 
  width of the rendered image. No matter which image sizes are used, the 
  image will always show the right proportions. Use it like this:

    up y*image_height
    right x*image_width

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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