Solving a B-spline exercise - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-22T13:38:10Z http://mathoverflow.net/feeds/question/103176 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/103176/solving-a-b-spline-exercise Solving a B-spline exercise unknown (google) 2012-07-26T09:02:41Z 2012-07-26T09:02:41Z <p>Hello,</p> <p>I'm trying to solve the B-spline equation for a given set of variables but I can never arrive at the answer in the book. I think there is some core concept I'm not understanding.</p> <p>Here are the variables <code>$n = 3 \mbox{, }p = 1 \mbox{, } u=1.5 \mbox{ and } U = \{0,1,2,3\}$</code></p> <p>This is the equation in the theory:</p> <p><code>$B _{i , 0} (u ) = \left\{ \begin{array}{rcl} 1 &amp; \mbox{ if } u_i ≤ u &lt; u_{i +1} \\ 0 &amp; \mbox{otherwise}<br> \end{array}\right.$</code></p> <p><code>$B _{i , p} (u ) = \frac{u − u_i}{u_{i + p} − u_i}B _{i , p-1} (u )-\frac{u_{i+p+1} − u}{u_{i + p+1} − u_{i+1}}B _{i+1 , p-1} (u )$</code></p> <p>The values I'm asked to compute and their answer:<br> <code>$B _{0 , 1} (1.5 ) =0$</code><br> <code>$B _{1 , 1} (1.5 ) =0.5$</code><br> <code>$B _{2 , 1} (1.5 ) =0.5$</code><br> <code>$B _{3 , 1} (1.5 ) =0$</code></p> <p>For the first value I'm doing:<br> <code>$B _{0 , 0} (1.5 ) =0 \mbox{ and } B _{1 , 0} (1.5 ) =1$</code><br> <code>$B _{0 , 1} (1.5 ) = \frac{1.5 − 0}{1 − 0}B _{0 , 0} (1.5 )-\frac{2 − 1.5}{2 − 1}B _{1 , 0} (1.5 )=1.5*0+0.5*1=0.5$</code><br> That doesn't match the above answer. </p> <p>In the second value I also end up with 0.5.<br> In the third I don't understand how to get <code>$u _{4}$</code> when the U vector only has 4 knots.<br> In the forth is the same problem.</p> <p>Is this exercise wrong or did I get it wrong?</p>