POV-Ray : Newsgroups : povray.general : Bug in Bezier patches ? Server Time
13 Aug 2024 17:30:00 EDT (-0400)
  Bug in Bezier patches ? (Message 1 to 4 of 4)  
From: Thomas Willhalm
Subject: Bug in Bezier patches ?
Date: 12 Aug 1998 09:49:17
Message: <qqmr9ymicvp.fsf@horn.fmi.uni-konstanz.de>
Hello,

I think that I have come across a bug in POV-Ray. Try to render the
following scene:

background { color rgb 1 }

camera {
  sky z
  location <1757,792,798>+<0,800,0>
  look_at <1757,792,798>
}

light_source { <-50,800,0>+<1757,792,798> color rgb 1.5 }

bicubic_patch {
  type 1 flatness 0.0 u_steps 4 v_steps 4
 
<1277.46,645.096,730.238><1273.35,640.857,678.616><1271.38,636.003,630.537><1271.54,630.534,585.999>
 
<1275.19,678.859,731.733><1315.94,664.298,681.323><1317.52,659.516,632.745><1279.95,664.515,585.999>
 
<1323.73,702.723,730.807><1358.35,687.334,681.949><1355.24,682.46,633.679><1314.41,688.101,585.999>
 
<1423.09,716.687,727.459><1400.58,709.966,680.493><1384.54,704.834,633.34><1374.95,701.292,586>
  pigment{color rgb 1}
}

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.

Thomas

-- 
Tho### [at] uni-konstanzde
http://www.fmi.uni-konstanz.de/~willhalm/
Tschieses lavs ju


Post a reply to this message

From: Ron Parker
Subject: Re: Bug in Bezier patches ?
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

From: Thomas Willhalm
Subject: Re: Bug in Bezier patches ?
Date: 12 Aug 1998 12:15:19
Message: <qqm1zqmxmd5.fsf@horn.fmi.uni-konstanz.de>
par### [at] my-dejanewscom (Ron Parker) writes:

> 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.

Thank you very much! This was a fast and very helpful response! 
 
> I'll let you go ahead and send the bug report to Chris.  If you'd like to
> quote this post, please feel free.

This is what I'll do.

Thanks again

Thomas

-- 
Tho### [at] uni-konstanzde
http://www.fmi.uni-konstanz.de/~willhalm/
Tschieses lavs ju


Post a reply to this message

From: Scott Hill
Subject: Re: Bug in Bezier patches ?
Date: 13 Aug 1998 08:04:11
Message: <01bdc5fd$a0e4f840$8c00a8c0@shindo.ddlinks.co.uk>
Thomas Willhalm <Tho### [at] uni-konstanzde> wrote in article
<qqm### [at] hornfmiuni-konstanzde>...
> 
> Hello,
> 
> I think that I have come across a bug in POV-Ray. Try to render the
> following scene:
> 
<scene snipped> 
> 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.
> 

	Yup, it's there in PovRay for Windows 3.1 beta 5.

-- 
Scott Hill
Sco### [at] DDLinkscouk
Software Engineer (and all round nice guy)
Company homepage : http://www.ddlinks.demon.co.uk

"The best trick the devil ever pulled was convincing people he didn't
exist..."
								- Verbal Kint.

"the Internet is here so we can waste time talking about nothing in 
 particular when we should be working" - Marcus Hill.


Post a reply to this message

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