POV-Ray : Newsgroups : povray.general : Bug in Bezier patches ? : Re: Bug in Bezier patches ? Server Time
13 Aug 2024 15:28:32 EDT (-0400)
  Re: Bug in Bezier patches ?  
From: Ron Parker
Date: 12 Aug 1998 11:52:26
Message: <35d1ac2a.0@news.povray.org>
On 12 Aug 1998 14:49:14 +0200, Thomas Willhalm
        <Tho### [at] uni-konstanzde> wrote:
>
>
>If you replace "type 1" by "type 0". The patch will look quite different.
>In my opinion the surface normal is not correct. Can some one confirm that
>this is a bug and check whether it is corrected in version 3.1b? (Since
>I use Unix I can not do it.) I will then email a bug report to Chris.

I can confirm that the bug still exists in the win32 build of beta 5.  If you
have the 3.0x sources, here's the fix:

In the file bezier.c in the function bezier_subdivider, lines 1526, 1538,
and 1545-1546 look like this:

1526: vt = (v1 - v0) / 2.0;
...
1538: ut = (u1 - u0) / 2.0;
...
1545: ut = (u1 - u0) / 2.0;
1546: vt = (v1 - v0) / 2.0;

These lines don't match the similar lines in bezier_tree_builder, where all
of the minuses are replaced with plusses.  Indeed, replacing the minus signs
in the above four lines with plus signs fixes the problem.

I'll let you go ahead and send the bug report to Chris.  If you'd like to
quote this post, please feel free.


Post a reply to this message

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