Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Algorithms > for Dave Eberly...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 4849 of 5015
Post > Topic >>

for Dave Eberly: 3D game engine design

by luca.pamparana@[EMAIL PROTECTED] Jul 5, 2008 at 06:24 AM

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
 




 2 Posts in Topic:
for Dave Eberly: 3D game engine design
luca.pamparana@[EMAIL PRO  2008-07-05 06:24:14 
Re: for Dave Eberly: 3D game engine design
"Dave Eberly" &  2008-07-05 08:07:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 2:23:44 CDT 2008.