Results 1 to 11 of 11

Thread: Cubic Sline with constraints

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Cubic Sline with constraints

    Hi all,

    I have a problem in trying to fit a continuous 3 eqn curve to five points but with constraints. VBA Hack has helped be significantly with a similar problem but I now need to adapt it.

    Basically I have the information in the attached picture.

    Information I have:
    X and Y coords of the start and end of the curve.
    the gradient at the ends = 0

    Curvature =0 at two known X coords.

    Gradient = 0 at one known Y coord.

    Is this enough information to find the three equations of the curve?

    This is what I've put together but I only have 9 of the 12 required equations to work out the 12 variables (a-l). I don't know what to do with the lowest point of the curve where I have the y coordinate and the gradient. But at best I can maybe get two equations out of that point. Can anyone help or advise me?

    Cubic Eqn 1 y = ax³ + bx² + cx + d
    Gradient y' = 3ax² + 2bx + c
    Curvature y'' = 6ax + 2b
    Cubic Eqn 2 y = ex³ + fx² + gx + h
    Gradient y' = 3ex² + 2fx + g
    Curvature y'' = 6ex + 2f
    Cubic Eqn 3 y = ix³ + jx² + kx + l
    Gradient y' = 3ix² + 2jx + k
    Curvature y'' = 6ix + 2j


    Eqn 1: y1 = ax1³ + bx1² + cx1 + d .......... End Point 1
    Eqn 2: y2 = ix2³ + jx2² + kx2 + l ............ End Point 2
    Eqn 3: y'(x1) = 0 = 3ax1² + 2bx1 + c .......... Gradient at End Point 1=0
    Eqn 4: y'(x2) = 0 = 3ix2² + 2jx2 + k ............ Gradient at End Point 2=0
    Eqn 5: 0 = ax3³+ bx3² + cx3 + d - ex3³ - fx3² - gx3 - h ..... join point is common to Eqn 1 and Eqn 2
    Eqn 6: 0 = ex3³+ fx3² + gx3 + h - ix3³ - jx3² - kx3 - l ..... join point is common to Eqn 1 and Eqn 2
    Eqn 7: 0 = 3ax3² + 2bx3 + c - 3ex3² - 2fx3 - g ............... Gradient continuity at join point
    Eqn 7: 0 = 3ex3² + 2fx3 + g - 3ix3² - 2jx3 - k ................. Gradient continuity at join point
    Eqn 8: 0 = 6ax3+ 2b - 6ex3 - 2f .................... curvature continuity at join point
    Eqn 9: 0 = 6ex3+ 2f - 6ix3 - 2j ...................... curvature continuity at join point
    Attached Images Attached Images  
    Last edited by sgrya1; Dec 14th, 2007 at 10:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width