POV-Ray : Newsgroups : povray.beta-test : the umpteenth time: removed features :( : Re: the umpteenth time: removed features :( Server Time
29 Jul 2024 14:22:48 EDT (-0400)
  Re: the umpteenth time: removed features :(  
From: Karl J  Anders
Date: 16 Jun 2002 03:09:42
Message: <3d0c39b6$1@news.povray.org>
Im Beitrag <3d0b6c80@news.povray.org>, Warp <war### [at] tagpovrayorg> schrieb:
>   You complain that vnormalize(<0,0,0>) returns an error, yet you don't
> complain that 1/0 returns an error.
>   However, they are practically the same thing (the vnormalize also performs
> a division by 0, as it divides each component with the length of the vector,
> which is 0).
>
Sorry, but that is not absolutely true, because that is NOT taking 1/0, but
0/0, and that can, depending on the circumstances, be almost anything.

And I KNOW (!) that it is rightfully undefined.

As I pointed out earlier in this thread, a function that returns the
normalized vector IF POSSIBLE and <0,0,0> else is USEFUL - and at least on
my system, POV3.1g and MacMegaPOV0.7 DID behave like that - and since it is
USEFUL, there were already people writing macros "Vnormalize" (or
"VNormalize") that work like that (sorry, I can't find the threads in a
hurry, but they WERE here !).

The serious (i.e. not bracketed and smiley-free) part of my proposal was to
add such a macro to an appropriate include file, so that this functionality
can used by all with the same macro name, if they wish to.

Again: I KNOW that the "new" - or not so new - behaviour is mathematically
correct, that is NOT my point !

Karl

--
The two most common things in the universe are hydrogen and stupidity.
(H.Ellison)


Post a reply to this message

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