# Splines

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

## Recommended Posts

If I have 5 points and the first four are computed using the Bezier curve. Then the next part is computed using the cubic B-spline curve, are they going to meet up or are the tangents going to be completely different. I just wanted to think about it before programming it because I don't understand all the differences about splines. I also wanted to think about it in a generic fashion rather than in a program where I have to pick points. Any explaination would be appreciated. Thanks.

##### Share on other sites
Quote:
 Original post by nprzAny explaination would be appreciated. Thanks.

seconded.

##### Share on other sites
If you treat the splines through adjacent sets of points as seperate entities rather than a continuous spline then there is no reason for them to be second order continuous at the shared point and so you will likely get a discontinuity in gradient. This is true even if you use the same method for both point sets if the point sets are treated seperatly unless you use a method such as Hermite splines which are constrained by not only position but also tangent direction at the points. In cases were tangent constraints can not be used I'd recommend overshooting each point set so they overlap and then blending the results. For example imagine you have a set of 7 points for which you want to solve the first half using method A and the second using method B. Solve points 1 to 5 using A and 3 to 7 using B and then gradually blend between the results of A and B between points 3 and 5. The problem with this though is that spline methods are usually picked for certain properties and during the blend you are not garaunteed to maintain the properties of either method A or B.

##### Share on other sites
In general, B-Splines don't interpolate their control points, which is disappointing because the cubic splines that do don't have C2 continuity.

That's what I thought until I just found this article that describes an equation for interpolating B-splines! It's like the best of both worlds.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 28
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634111
• Total Posts
3015573
×