|
|
When 3.1g encounters scale .5*z it issues error
messages for x and y scale by 0 and informs us of scale
by 1 instead.
OK, not a bug but this is inconsistant with
translate and rotate .5*z which do not issue error
messages.
While we can see that that an assumed zero would
only result in a real problem for scale and not for
translate or rotate the assumption of shorthand should
exist in all three cases and error messages should be
consistant.
I presume this goes to the parser which expands
.5*z to <0,0,.5> before looking at the what it is a
vector for. But if the error can be referred to a
correction from 0 to 1, certainly it can also flag the
error message as not emit.
Post a reply to this message
|
|
|
|
In article <386B6135.C0949B61@ij.net>, Matt Giwer <jul### [at] ijnet>
wrote:
> When 3.1g encounters scale .5*z it issues error
> messages for x and y scale by 0 and informs us of scale
> by 1 instead.
>
> OK, not a bug but this is inconsistant with
> translate and rotate .5*z which do not issue error
> messages.
Actually, it is consistant. .5*z implies that x and y are 0, and you can
not scale by 0, so a warning is produced and the 0 is changed to 1. You
can rotate and translate by 0, so there is no warning in those cases.
The reason they don't issue warnings is that there is nothing to warn
about.
> While we can see that that an assumed zero would
> only result in a real problem for scale and not for
> translate or rotate the assumption of shorthand should
> exist in all three cases and error messages should be
> consistant.
The messages are consistant: everything that results in scaling by 0
will produce a warning.
> I presume this goes to the parser which expands
> .5*z to <0,0,.5> before looking at the what it is a
> vector for. But if the error can be referred to a
> correction from 0 to 1, certainly it can also flag the
> error message as not emit.
I really don't see the problem...do you want the language to act like x,
y, and z are labels for each axis instead of being shorthand for
<1,0,0>, <0,1,0>, and <0,0,1>? The warnings are there to notify you that
you might have made a mistake.
You can turn the warnings off, but I would recommend just not writing
that kind of code. If you insist, you can use something like this:
scale x+y+z*0.5
but I still prefer
scale < 1, 1, 0.5>
for readability.
Oh, and this isn't Windows specific, this would fit better in
povray.general.
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|