- #1
- 1,782
- 32
Hi,
I have been playing with B-splines recently and I have had some curious results. As a rest, I had a set of points on the ellipse; [tex]\frac{x^{2}}{9}+y^{2}=1[/tex]. I used the paramatrisation [tex]x=3\cos\theta ,\quad y=\sin\theta[/tex] and I computed the derivatives numerically (I had to come up with a numerical scheme for differentiation using non-uniform grids. It works okay for some simple functions but I am not very familiar with how these things are done)
I found that the first derivative (w.r.t. [itex]\theta[/itex]) was very well approximated (to within 10^-3), plotting it on matlab, you could just about see where they were different. When I calculated the second derivative (w.r.t. [itex]\theta[/itex]) (by applying my derivative formula again), the curves were a poor agreement. There were lots of oscillations in the calculation of the second derivative.
So my question is this:
Are the oscillations just a sign of my poor choice of numerical derivative, this phenomena an example of Runge's phenomena or something which is inherent within B-splines? I was using a degree 5 B-spline, the result was worse for a degree 7 curve.
Any suggestions?
I have been playing with B-splines recently and I have had some curious results. As a rest, I had a set of points on the ellipse; [tex]\frac{x^{2}}{9}+y^{2}=1[/tex]. I used the paramatrisation [tex]x=3\cos\theta ,\quad y=\sin\theta[/tex] and I computed the derivatives numerically (I had to come up with a numerical scheme for differentiation using non-uniform grids. It works okay for some simple functions but I am not very familiar with how these things are done)
I found that the first derivative (w.r.t. [itex]\theta[/itex]) was very well approximated (to within 10^-3), plotting it on matlab, you could just about see where they were different. When I calculated the second derivative (w.r.t. [itex]\theta[/itex]) (by applying my derivative formula again), the curves were a poor agreement. There were lots of oscillations in the calculation of the second derivative.
So my question is this:
Are the oscillations just a sign of my poor choice of numerical derivative, this phenomena an example of Runge's phenomena or something which is inherent within B-splines? I was using a degree 5 B-spline, the result was worse for a degree 7 curve.
Any suggestions?