POV-Ray : Newsgroups : povray.beta-test : vnormalize : Re: vnormalize Server Time
29 Jul 2024 14:15:44 EDT (-0400)
  Re: vnormalize  
From: Mike Williams
Date: 22 Apr 2002 13:37:45
Message: <cW9soGA0REx8EwjA@econym.demon.co.uk>
Wasn't it ingo who wrote:
>in news:K0a### [at] econymdemoncouk Mike Williams wrote:
>
>> 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. 
>> 
>
>Mike,
>
>There should be no need to catch vnormalize(0), unless you calculate 
>points that don't "resolve" somehow, stuff like lim->0. Using the FromU
>() etc. macros helps. See below example (from a somewhat more recent 
>version):
>
>#declare R=1;
>#declare F1=function(U,V){R*sin(V)*cos(U)}
>#declare F2=function(U,V){R*cos(V)}
>#declare F3=function(U,V){R*sin(V)*sin(U)}
>object { 
>  Parametric (
>    F1, F2, F3,
>    <0, 2*pi>,
>    <FromV(0), pi>, //<0,pi> results in an error
>    100,50,""
>  )
>  pigment {rgb 1}
>  finish{specular 0.3}
>  rotate <0,0,0>
>}
>
>Ingo

I would prefer to retain the "param.inc" versions of the examples on my
Isosurface tutorial page, because they are so much faster than real
parametrics. At the moment over half of them fail to run under RC2.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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