Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What is the best way to create a smooth curve path from a set of points? For example:

Smooth curve path through points

I've seen Bezier curves before, but those try to smooth out the path from the set of points, like this:

Bezier curve

share|improve this question

2 Answers 2

up vote 6 down vote accepted

There are multiple types of Splines, Bezier curves are one of them. Beziers aren't required to pass through the points that define them. From the looks of it, you want a regular cubic spline. It will ensure that the line crosses through the points specified. You can find some interactive examples of different types here.

Also, I know you're busy being an 80's guy, but get that boneitis checkout ASAP.

share|improve this answer
2  
That has the slick, dazzling veneer of the 1980s. I'll get my boneitis checked out when I'm done being an 80s guy. –  Darkenor Oct 9 '12 at 18:53

You may want Catmull-Rom splines. They go through every point (unlike Bezier curves, which don't go through the control points).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.