POV-Ray : Newsgroups : povray.general : Feature request: Various SDL / Command Line Stuff Server Time
30 Jul 2024 16:23:02 EDT (-0400)
  Feature request: Various SDL / Command Line Stuff (Message 21 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Feature request: Various SDL / Command Line Stuff
Date: 21 Mar 2009 14:05:01
Message: <web.49c52b1ea38ff53041685c200@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> I think that this is an issue on which there is no substitute for the
> user knowing exactly what he/she is doing.

If the SDL provided a way to specify the intended aspect ratio, then it would be
an easy thing to warn the user if they specify a resolution with a different
aspect ratio.


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: Feature request: Various SDL / Command Line Stuff
Date: 21 Mar 2009 15:00:06
Message: <49c53936@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

clipka wrote:
> John VanSickle <evi### [at] hotmailcom> wrote:
>> I think that this is an issue on which there is no substitute for the
>> user knowing exactly what he/she is doing.
> 
> If the SDL provided a way to specify the intended aspect ratio, then it would be
> an easy thing to warn the user if they specify a resolution with a different
> aspect ratio.
> 
> 
>

#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

- --
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAknFOTQACgkQd0kWM4JG3k8swQCfe2qGwqqj0vdT0qqhYmnWfRx8
eLMAoJcutxGtP2zta7AbU/TkJ+Up84eG
=ICi9
-----END PGP SIGNATURE-----


Post a reply to this message

From: clipka
Subject: Re: Feature request: Various SDL / Command Line Stuff
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

<<< Previous 10 Messages Goto Initial 10 Messages

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