Giving a point on a uniform bspline curve, how to get the tangent vector of this point

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












A bspline curve of order $k$ is given by
$$C(t) = sum_i=0^n P_i N_i,k(t).$$
where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
$$T = (t_0,t_1,...t_n+k).$$
with
$$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
$$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
And it's derivative is
$$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$



Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?



Update:



I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.



The iteration function is:
$$ f(t) = C'(t)(C(t) - P)$$
$$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$



The convergence criterion are:
$$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
$$ |C(t_i) - P| <= varepsilon_1 $$
$$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$



I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.



So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.







share|cite|improve this question


























    up vote
    2
    down vote

    favorite












    A bspline curve of order $k$ is given by
    $$C(t) = sum_i=0^n P_i N_i,k(t).$$
    where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
    $$T = (t_0,t_1,...t_n+k).$$
    with
    $$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
    $$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
    And it's derivative is
    $$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$



    Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?



    Update:



    I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.



    The iteration function is:
    $$ f(t) = C'(t)(C(t) - P)$$
    $$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$



    The convergence criterion are:
    $$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
    $$ |C(t_i) - P| <= varepsilon_1 $$
    $$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$



    I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.



    So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.







    share|cite|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      A bspline curve of order $k$ is given by
      $$C(t) = sum_i=0^n P_i N_i,k(t).$$
      where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
      $$T = (t_0,t_1,...t_n+k).$$
      with
      $$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
      $$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
      And it's derivative is
      $$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$



      Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?



      Update:



      I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.



      The iteration function is:
      $$ f(t) = C'(t)(C(t) - P)$$
      $$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$



      The convergence criterion are:
      $$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
      $$ |C(t_i) - P| <= varepsilon_1 $$
      $$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$



      I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.



      So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.







      share|cite|improve this question














      A bspline curve of order $k$ is given by
      $$C(t) = sum_i=0^n P_i N_i,k(t).$$
      where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
      $$T = (t_0,t_1,...t_n+k).$$
      with
      $$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
      $$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
      And it's derivative is
      $$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$



      Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?



      Update:



      I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.



      The iteration function is:
      $$ f(t) = C'(t)(C(t) - P)$$
      $$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$



      The convergence criterion are:
      $$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
      $$ |C(t_i) - P| <= varepsilon_1 $$
      $$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$



      I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.



      So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 30 at 3:20

























      asked Aug 26 at 13:05









      Phymin

      358




      358

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895020%2fgiving-a-point-on-a-uniform-bspline-curve-how-to-get-the-tangent-vector-of-this%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895020%2fgiving-a-point-on-a-uniform-bspline-curve-how-to-get-the-tangent-vector-of-this%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Mutual Information Always Non-negative

          Why am i infinitely getting the same tweet with the Twitter Search API?