Jump to content
  • Advertisement
Sign in to follow this  
ryt

B-Spline basis function

This topic is 3676 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is basis function of a B-Spline: Look at the second term. See the Bj+1,n-1(t). J is the control point and N is order. Lets say we have 4 control points and we want to compute a Point at some value of t. Imagine we did some calculations and we need compute basis function for 4-th control point. We start to look for j+1, n-1. N-1 is ok since we have calculated lower orders before. But what abaut j+1, we are at 4-th control point, and j+1 is 5-th control point. How we can solve for 5-th control point since it does not exist? It is out of bounds. Did I understand something wrong or this is some wierd way?

Share this post


Link to post
Share on other sites
Advertisement
No, The basis functions doesn’t depends on control points but on knots. Every B-Spline of degree d is defined by a sequence of m+1 non-decreasing real numbers and n+1 control points where m = n + d + 1. t0...tm are the knots and not the control points. bj,n-1, bj+1,n-1 are the basis functions of a B-Spline of one degree less than the basis function you are calculating.
The B-spline is then defined by: sum_{i=0}^{n} bibi,d(t) where the bi are the control points.

Look at the The de Boor algorithm for a different way to calculate points on the curve (similar to the de Casteljau algorithm for Bézier curve).

Share this post


Link to post
Share on other sites
Yes, but we have one basis function for every control point.
Bi are the basis functions for every control point, and in recursive formula for finding basis function the Bj+1,n-1 is indexing into j+1 n-1 wich means "for this control point (bi) + 1, on a previous degree (n-1)".
But how (bi) + 1 if we are calculating for 4-th control point, than this means 4+1 = 5.

Share this post


Link to post
Share on other sites
The basis functions have nothing to do with the control points. If you apply the formula you gave to the general formula you will see that the basis function Bi+1,d-1 is multiplied by the ith control point even if his index is i+1.

Share this post


Link to post
Share on other sites
The formula become:

sum{i=0}{n} bii,dBi,d-1 + βi,dBi+1,d-1)

where
αj,n = (t - tj)/(tj+n - tj)
βj,n = (tj+n+1 - t)/(tj+n+1 - tj+1)

Share this post


Link to post
Share on other sites
@ryt: I think you're just forgetting that there are going to be more knots than control points, and that the basis function operates on knots. For a cubic B-spline, you will have 2 additional knots on both ends of the vector (for a total of d + 1 extra).

Share this post


Link to post
Share on other sites
yeah, I knew that but I forgot, apatriarca mentiond it but I havent realize it, thx

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!