Understanding Cardinal Splines - Formula Explained

  • Thread starter Thread starter Gepard
  • Start date Start date
Click For Summary
Cardinal splines are defined using a formula that calculates tangents based on control points, specifically Ti = a * (Pi+1 - Pi-1). Understanding this formula involves breaking it down into its x and y components, which relate to the slope of the curve. The slope is expressed as dy/dx = (dy/ds) / (dx/ds), where the formulas for Tix and Tiy represent these derivatives. The choice of tangent values at the endpoints is flexible, allowing for various spline shapes based on user-defined parameters. This flexibility makes cardinal splines a powerful tool for creating smooth curves in graphics and modeling.
Gepard
Messages
18
Reaction score
0
Hi,

I'm trying to draw a Cardinal Spline and understand them - however I can't get my head around the formula.

Now, after lots of research I keep coming back to this formula:

Ti = a * (Pi+1 - Pi-1 )

taken from this page(there's a similar one on Wikipedia): http://cubic.org/docs/hermite.htm

However I don't understand how that formula can provide a tangent. In the past all the formulae I have used have been of function types where I'd put through say the X co-ordinate and it would tell me the Y co-ordinate.

Can someone please provide a better explanation as to how I use it please?

Thanks in advance,

Michael
 
Physics news on Phys.org
I think maybe you are looking for a physical interpretation of the formula and how that relates to the slope at the free end. It might help to break P into its' x & y components:

Tix = a * ( xi+1 - xi-1)
Tiy = a * ( yi+1 - yi-1)

In a parametric curve, the slope of the curve is dy/dx = (dy/ds) / (dx/ds). The formulas above represent (dy/ds) and (dx/ds). I hope this helps.

With splines, the end points are arbitrarily chosen by the person implementing them. I can freely choose to say T1 = -42 and T2 = 0.4 and have a perfectly valid spline. It doesn't really matter how I derived them. In the case of cardinal splines, they provide a special mechanism (a control point and tension parameter) as a convenient way to specify the end condition.
 
Last edited:

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 27 ·
Replies
27
Views
5K