POV-Ray : Newsgroups : povray.beta-test : vnormalize : vnormalize Server Time
29 Jul 2024 14:16:29 EDT (-0400)
  vnormalize  
From: Mike Williams
Date: 21 Apr 2002 21:05:59
Message: <K0aJQDAtG2w8Ewq6@econym.demon.co.uk>
Can anyone remind me what vnormalize(<0,0,0>) used to return under
previous betas?

I'm trying to get some code (actually Ingo's "param.inc" macro) to work
the same under RC2 as it did before vnormalize(<0,0,0>) became an error.

The docs say "A/vlength(A)", so I tried replacing 
     #declare Norm=vnormalize(vcross(A,B));
with
     #declare Norm = vcross(A,B)/vlength(vcross(A,B));

V3.1 returned <0,0,0>. so I tried
   #if (vlength(vcross(A,B))=0)
     #declare Norm=<0,0,0>;
   #else
     #declare Norm=vnormalize(vcross(A,B));
   #end   

but neither of these produce images that look quite the same as in
previous betas.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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