|
![](/i/fill.gif) |
Wasn't it Tim Nikias who wrote:
>Mike Williams wrote:
>
>> 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.
>>
>I think the problem isn't the value being returned, but the
>internal mess POV-Ray creates to its own internal
>data. Like setting a switch when calculating vnormalize
>with <0,0,0> which just rips the scene apart.
>
>Thats my experience, calculation works fine, but the
>output image is worthless, because objects get deleted,
>cut in half or appear as ghosts, but never moved around
>to where they shouldn't belong.
>I wrote a macro:
>
>#macro VNormalize(_vec)
> #if (vlength(_vec)!=0)
> #local _ret=vnormalize(_vec);
>#else
> #local _ret=<0,0,0>;
>#end
>//Return value:
>_ret
>#end
As I said, I tried <0,0,0> (because that's what v3.1 returns) and the
resulting image doesn't look the same as it did in previous betas.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |