Hello,
I have a question about a code segment in your book "3D Game Engine
Design": Second edition.
On page 325, you have the algorithm for evaluating a B-spline curve
and you have the function GetKnow as follows:
float GetKnot(int i)
{
if (i <=d) return 0;
if (i >= n + 1) return 0;
return (i-d)/(n+1-d);
}
I have a question about the second line. The knot function is
described as:
u(i) = 1 when n + 1 <= i <= n+d +1.
Shouldn't the second line return 1 instead of 0?
Many thanks and I look forward to your or anyone else's answer on this
as it has me confused a bit..
Cheers,
Luca