POV-Ray : Newsgroups : povray.beta-test : HF Macros - serious bug, optimizations and little suggestion : Re: HF Macros - serious bug, optimizations and little suggestion Server Time
29 Jul 2024 12:15:00 EDT (-0400)
  Re: HF Macros - serious bug, optimizations and little suggestion  
From: Jérôme Grimbert
Date: 16 May 2002 07:44:49
Message: <3CE39BC9.E5F906F1@atosorigin.com>


[About a bug, maybe he is right, I do not know]

>          #local A = (J  )*zRes+(K  );
>          #local B = (J+1)*zRes+(K  );
>          #local C = (J+1)*zRes+(K+1);
>          #local D = (J  )*zRes+(K+1);
>          <A,B,C>,<A,C,D>,
> But since I was in this part I started to optimize this stuff. Note that
> optimized part is exactly the same as:
>          #local A = (J  )*zRes+(K  );
>          #local B = A + zRes;
>          #local C = A + zRes + 1;
>          #local D = A + 1;
>          <A,B,C>,<A,C,D>,

I do not agree.
Mathematically, you are correct.
But Computationaly, you may end up with overlapping part and holes,
because the way you compute the coordinates are not always
exactly the same when you are iterating in the loop.

Maybe I'm just paranoid.


Post a reply to this message

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