POV-Ray : Newsgroups : povray.binaries.scene-files : Wind pattern code and reed stalk example : Re: Wind pattern code and reed stalk example Server Time
27 Apr 2024 14:46:58 EDT (-0400)
  Re: Wind pattern code and reed stalk example  
From: Thomas de Groot
Date: 27 Sep 2014 10:26:05
Message: <5426c8fd$1@news.povray.org>
On 27-9-2014 15:23, kurtz le pirate wrote:

> because sometimes <Norm> is equal to <0.000, 1.000, 0.000>
> then, you caculate VerAng with :
>      #local VerAng = VAngleD(<Norm.x, 0, Norm.z>, Norm);
>
> first parameter become <0.000, 0.000, 0.000>
>
> VAngleD use vnormalize that is not defined for a null vector.
>
> and you get :
>      Possible Parse Error: Normalizing zero-length vector.
>
>
> you can, for exemple, correct this by adding smalls values to <Norm>
>      #if ((Norm.x = 0.0) &  (Norm.z = 0.0))
>          #local Norm = <0.0001, Norm.y, 0.0001>;
>      #end
>

Simple and effective indeed. Thank you. I had difficulty in visualizing 
what was exactly happening.

Thomas


Post a reply to this message

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