Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What Is A "Cubic" Spline?

  1. Feb 23, 2015 #1
    What is the meaning of "cubic" term in a cubic spline?

    Is it mean a spline with a degree of 3?
     
  2. jcsd
  3. Feb 23, 2015 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    Yes. A spline is a mechanical device which is used to draw a curve which passes thru several known points.

    A cubic spline is a mathematical equation which replicates what the physical device is used for: creating a smooth curve which passes thru all the data points. The equation is a polynomial of degree three in this case. There are other formulations used, but cubic splines are very common and easy to construct.

    http://en.wikipedia.org/wiki/Spline_interpolation

    Splines are useful for interpolating data in between the fixed points used in their development.
     
  4. Feb 23, 2015 #3
    Does this mean a quadratic spline is a spline with degree 2?

    Is there availabe a quartic, quintic, and so on, of a spline?

    What is the difference between quadratic and cubic spline?
     
  5. Feb 23, 2015 #4
    Yes, the differences between all those curves are really a matter of polynomial degree. Quadratic splines can interpolate the same data points that cubic splines can, but it doesn't have quite the same shape. You can imagine a quadratic spline being a series of parabolas that you're trying to string together to run through the data points and maintain a certain continuity. Cubic splines are like that in much the same way, and quartic, quintic, etc.

    Splines are interesting because they form the math basis of computer-aided design. Because of numerical errors, generally lower-degree splines are nicer to work with, but you can't really go too low without getting some interesting effects. For example, cubic splines are usually used because you can achieve what's called C2 continuity. The math is kinda cool, but this has effects in the real world. For example, car bodies are usually C2 because if they weren't they wouldn't look smooth in a showroom because it wouldn't have smooth reflection lines.
     
  6. Feb 23, 2015 #5

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    In theory, you could produce higher order splines, but the math becomes more complex with increasing order. Higher order splines tend to oscillate as well, and sometimes fail to produce a smooth curve which passes thru the data points.

    The cubic spline is the formulation which most closely mimics the elastic behavior of a physical spline.

    Quadratic interpolating splines can also be developed, but due to the nature of the resulting curve (a parabola), these splines are not as widely useful as the cubic. Quadratic interpolation is, however, used as the basis for developing Simpson's First Rule of numerical integration, while cubic interpolation forms the basis for Simpson's Second Rule.
     
  7. Feb 24, 2015 #6
    What kind of numerical error it is?

    Is it such as any number divide by 3 (such as 1/3, 2/3, 4/3, 5/3, 7/3. and so on) as the result is not being an integer (such as 1.33333, 0.6666667, and so on)?

    What is C2 continuity?

    Could you give an example?
     
  8. Feb 24, 2015 #7
    Part of it is due to truncation error because of the finite number of bits that represent the number (like 1/3 = 0.33333... but also that 0.1 can't be accurately represented in a finite number of bits in binary). Increasing precision can help, but only to a certain degree. The other part of it is due to numerical stability (i.e. how susceptible the polynomial is to small errors in numerical values). Numerical stability is why splines in CAD are generally represented in the Bernstein basis rather than in the power basis. Larger polynomials generally are less numerically stable, so cubic splines are the de facto standard because it's the lowest degree that can we can force C2 continuity with.

    In a matter of speaking, a spline is basically a bunch of curves strung together. For example, a B-spline can be represented as a series of Bezier curves. However, when you string curves together, you can control how continuous you want the resulting spline to be. Curves that meet at an endpoint only are said to be C0 continuous (usually seen as a sharp point there). If the curves are C0 and also the derivatives of the curves (tangent lines) are equal at that endpoint, the curves are said to be C1. If the curves are C1 and the second derivatives are equal (osculating circles or curvature) there, then they are C2. C2 continuity is important for a lot of reasons. I already mentioned the smooth reflection lines on a car hood. If you're designing a set of train tracks to meet, C2 continuity ensure that there is finite jerk (derivative of acceleration) at the point where they meet.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: What Is A "Cubic" Spline?
  1. Spline Derivation (Replies: 0)

  2. Cubic Splines (Replies: 0)

Loading...