POV-Ray : Newsgroups : povray.advanced-users : Some math aid required... : Re: Some math aid required... Server Time
29 Jul 2024 02:24:20 EDT (-0400)
  Re: Some math aid required...  
From: andrel
Date: 11 Feb 2004 04:19:54
Message: <4029F379.9060901@hotmail.com>
Christopher James Huff wrote:
> In article <402### [at] hotmailcom>,
>  andrel <a_l### [at] hotmailcom> wrote:
> 
> 
>>>3*(P2 - P1 + (P1 - 2*P2 - P3)*2*t + (P2*3 + P3*3 + P4 - P1)*t^2)
>>>
>>>(somebody want to check that?)
>>
>>3*(P2 - P1 + (P1 - 2*P2 + P3)*2*t + (-P1 + P2*3 - P3*3 + P4)*t^2)
> 
> 
> Well, that doesn't work. The resulting lines are close, but not quite 
> tangent. 

Are you sure? I have used this myself and when I used it
the tangents were correct. Note also the symmetries in the
coefficient, the binomial coeeficients and the nice alternating
signs. I think the original error may be in the line:
 > P2*3*(2*(1 - t)*(-1)*t + (1 - t)2) -
In my deriviation the final '-' is a '+'. BTW, I derived the
equations in the same way as you did. Well, of course, we both
have the same sort of math training I suspect :).

completely aside:
I had to compute the tangents when trying to
understand where some of my apparently discontinuous
normals in bezier patches come from. To check what I
would expect against the POV source I  manually
constructed a subdivision in smooth triangles. For
this I needed the local normal in the vertices of the
subdivided patch. The result was nearly identical to
the POV version and remaining differences the result
of round off errors. Conclusion: there is nothing
wrong with mor mine nor POVs calculations. I only
still have these images with discontinuous normals
in bezier patches that I can prove to be continuous.
In short: I an still absolutely confused about this.
But that is life I suspect :)
To be continued someday, but todat I have to work
a bit first.

 > My results look right, any errors are small ones.
 >
What equations did you use in the end?


Post a reply to this message

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