Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Cubic Spline Interpolation Guessing the Control Points (https://www.askmehelpdesk.com/showthread.php?t=357971)

  • May 26, 2009, 05:30 AM
    luckpp
    Cubic Spline Interpolation – Guessing the Control Points
    Hello,

    Given a set of 2D points (located on a 2D graph) I want to guess the spline cubic control points in order to draw a smoother 2D graph.

    I will use a set of images in order to show you what I want to do:

    Starting from 5 control points ( [0, 0], [25, 50], [50, 25], [75, 75], [100, 100] ) I was able to guess the intermediate points using Cubic Spline Interpolation. Below is the result:


    Graph_OK


    My problem is when I try to do the reverse operation, namely : starting from a set of 101 known 2D points ([x0, y0] [x1, y1], … [xk, yk], … [x99, y99], [x100, y100]) I want to guess some control points in order to draw a smoother graph than the one resulting from the initial 101 2D points.

    In a rough form the graph may look like this:


    Graph_NOK



    But I want a smoother graph.
    I would highly appreciate your help. Any hint on how should I guess the control points and draw a spline curve would be great.

    Thank you very much and Best regards,
    Lucian Andritoi.
  • May 26, 2009, 06:35 AM
    Perito

    I find cubic spline interpolation to be a bit irritating in the same way that you're finding. Often, I'll use Savitzky-Golay convolution to filter equally-spaced points (I don't know if yours are equally spaced on the x-axis or not).

    Savitzky-Golay smoothing filter

    Some of the equations given in SG's paper are incorrect and are corrected in subsequent papers by SG and others.

  • All times are GMT -7. The time now is 12:48 PM.