Understanding Cardinal Splines - Formula Explained

  • Thread starter Gepard
  • Start date
In summary, the conversation is about the formula for drawing a Cardinal Spline and the user's confusion about how it can provide a tangent. They are looking for a better explanation and understanding of how to use the formula. An expert suggests breaking the formula into its x and y components and relates it to the slope of the curve in a parametric curve. They also mention that with splines, the end points are arbitrarily chosen and the formula provides a convenient way to specify the end condition.
  • #1
Gepard
18
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
  • #2
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:
  • #3


Hi Michael,

I completely understand your confusion with the formula for Cardinal Splines. The reason it may be difficult to understand is because it is not a typical function type formula, like you mentioned. Instead, it is a formula that calculates the tangent vector for a point on the spline curve.

To better understand this, let's break down the formula into its components. First, let's look at the "a" term. This represents the tension of the spline, which essentially controls how smooth or sharp the curve will be at that particular point. A higher tension value will result in a sharper curve, while a lower tension value will result in a smoother curve. This allows for more control and customization of the spline curve.

Next, we have the "Pi+1" and "Pi-1" terms. These represent the points that come before and after the point we are calculating the tangent for. For example, if we are calculating the tangent for point Pi, then Pi+1 would be the next point on the curve and Pi-1 would be the previous point. These points are important because they help determine the direction of the tangent vector.

Now, let's look at the overall formula again. The result of this formula is a vector, which has both a magnitude and direction. The magnitude is determined by the "a" term, which we already discussed. The direction is determined by the difference between Pi+1 and Pi-1. Essentially, this formula is taking the difference between these two points and scaling it by the tension value to get the final tangent vector.

I hope this explanation helps in understanding the formula for Cardinal Splines. Remember, it is not a typical function type formula, but rather a formula for calculating the tangent vector at a specific point on the spline curve.
 

1. What is a cardinal spline?

A cardinal spline is a type of mathematical curve that is commonly used in computer graphics and animation. It is defined by a set of control points and a tension parameter, which determines the shape of the curve.

2. How is a cardinal spline different from other types of splines?

Unlike other types of splines, such as Bezier curves, cardinal splines pass through all of its control points. This makes them useful for creating smooth and continuous curves.

3. What is the formula for a cardinal spline?

The formula for a cardinal spline is: P(t) = (1-t)^3 * P0 + 3(1-t)^2 * t * P1 + 3(1-t) * t^2 * P2 + t^3 * P3, where P0, P1, P2, and P3 are the control points and t is the tension parameter.

4. How is the tension parameter used in a cardinal spline?

The tension parameter controls the shape of the curve by adjusting the tightness of the curve around the control points. A higher tension value will result in a sharper curve, while a lower tension value will result in a smoother curve.

5. What are some practical applications of cardinal splines?

Cardinal splines are commonly used in computer graphics and animation to create smooth and natural-looking curves. They are also used in CAD software, video games, and web design. Additionally, they can be used in data analysis and interpolation, such as in GPS mapping and motion tracking.

Similar threads

Replies
5
Views
1K
Replies
1
Views
932
Replies
3
Views
1K
Replies
14
Views
1K
Replies
2
Views
1K
  • Calculus
Replies
3
Views
2K
Replies
27
Views
1K
Replies
22
Views
2K
Replies
207
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
284
Back
Top