|
|
> Hello,
>
> I think to have found some bugs in povray's source code version 3.6
> (should be the latest). More precisely, I found a problem in the way
> you compute normal for a bezier patch (file: bezier.cpp). To say the
> truth, I think that it's only a typo, but however... :)
>
> Take a look at the following function (cut & pasted from bezier.cpp):
>
> Assign_Vector(vertices[1], (*Patch)[3][3]);
>
> VSub(TempV, vertices[0], vertices[1]);
>
> VLength(temp1, TempV);
>
> if (fabs(temp1) < EPSILON)
> {
> return (-1.0);
> }
>
> Assign_Vector(vertices[2], (*Patch)[3][0]);
>
> VSub(TempV, vertices[0], vertices[1]);
> ^
> +---- WRONG!!! Should be:
> vertices[2],
> isn't it?
>
> VLength(temp1, TempV);
>
> if (fabs(temp1) < EPSILON)
> {
> return (-1.0);
> }
>
Well, twice the same test, without effective usage of [2], look like a
quick copy/paste of code which lack the expected correction at the second
iteration.
So, yes, it seems there is a code error here, and let's blame the typo!
Now, go and make a scene that illustrate it...
It could be at least interesting to see if we really need a big array of
4 for Vertices... but that require to make sense of the complete
function, I do not have time for that.
--
l'habillement, les chaussures que le maquillage et les accessoires.
Post a reply to this message
|
|