POV-Ray : Newsgroups : povray.general : Feature request: Various SDL / Command Line Stuff : Re: Feature request: Various SDL / Command Line Stuff Server Time
30 Jul 2024 16:21:45 EDT (-0400)
  Re: Feature request: Various SDL / Command Line Stuff  
From: clipka
Date: 21 Mar 2009 15:50:00
Message: <web.49c54380a38ff53041685c200@news.povray.org>
=?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= <jeb### [at] freefr> wrote:
> #declare aspect_ratio = 4/3;
> #if (abs (image_width / image_height - aspect_ratio) < 1e-6)
>    #warning concat ("Invalid aspect ratio: expected ",
>                     str (aspect_ratio, 1, 3),
>                     " got ",
>                     str (image_width / image_height, 1, 3),
>                     "\n")
> #end

Fine. But why not do this via an SDL statement? The benefits I see would be:

* No cluttering up of the SDL file with yet another macro construction that
still just does some standard thingy

* Providing an official recommended way to deal with aspect ratio that *really*
makes sense (the current recommendation has drawbacks on its own)

* Allowing for additional improvements, like:

- a command line parameter specifying the intended pixel aspect ratio that could
automatically be incorporated into this check (so e.g. specifying an intended
pixel aspect ratio of 2:1 on the command line would suppress the warning when
rendering a 4:3 scene with a resolution of 320x480 pixels) (note that such a
parameter, in turn, could some time become of interest for certain file formats
that natively support pixel aspect ratios other than 1:1)

- providing a shorthand way to set up the camera up/right/direction stuff


Honestly, I see no drawback at all associated with an explicit aspect ratio SDL
parameter. But all existing ways of dealing with aspect ratio *do* have
drawbacks - if only that they're unnecessarily cumbersome.


Post a reply to this message

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