last day (40 days later) » 

03:08
I had the main chatroom in mind, but this is fine… :)
03:25
Sorry, I cannot log in this room, so I restart my PC
Now I construct a matrix as follow:
n = 40;
RandomSeed[10];
pts =
RandomInteger[{1, 10}, {n, 2}];
knots = {Range[0, 1, 1/n][[-4 ;; -2]] - 1, Range[0, 1, 1/n],
Range[0, 1, 1/n][[2 ;; 4]] + 1} // Flatten;
paras1 = Range[0, 1, 1/n] // Most // N;
mat =
Outer[BSplineBasis[{3, knots}, #2, #1] &, paras1,
Range[0, (n - 1) + 3]];
{a, b} = Dimensions[mat];
mat = Take[mat, a, a] + PadRight[Take[mat, a, a - b], {a, a}];
LinearSolve[mat]
I want to interpolate a sets of points with a closed B-spline curve
And you're asking if that configuration will always yield a well-conditioned matrix.
Did you have an example where it became ill-conditioned?
Yes, I discovered that the mat always well-conditioned. So I would like to know why. Namely, how to prove it
testConditionNumer[n_] :=
Module[{pts, knots, paras, a, b, mat},
RandomSeed[10];
pts = RandomInteger[{1, 10}, {n, 2}];
With[{inter = Range[0, 1, 1/n]},
knots = {inter[[-4 ;; -2]] - 1, inter, inter[[2 ;; 4]] + 1} //
Flatten
];
paras = Range[0, 1, 1/n] // Most // N;
mat = Outer[BSplineBasis[{3, knots}, #2, #1] &, paras,
Range[0, (n - 1) + 3]]; {a, b} = Dimensions[mat];
mat = Take[mat, a, a] + PadRight[Take[mat, a, a - b], {a, a}];
LinearSolve[mat]
]
In the function testConditionNumer, 3 is the degree of B-spline, and 3 is odd
03:44
I think that's a coincidence more than anything.
If memory serves, de Boor had papers on this. It's related to the fact that the banded matrices involved are diagonally dominant and those matrices can then be proven to be well-conditioned.
For 5 points, the mat shown as below
case for n=20
Yes, I think it's the diagonal dominance. Your system can be permuted to a "periodic banded" system by reordering the variables, and then the diagonal dominance can be shown.
I had deboor's book A practical guide to spline. However I didn't find the message about it. Maybe I missed something
Either that or his papers, I don't have my books with me now.
In that cubic case, the system can be permuted to a periodic tridiagonal system where the diagonal elements are 2/3 and the off-diagonals and corners are 1/6. That is definitely diagonally dominant.
OK, now it's time for lunch now. Let us continue this discussion this afternoon. thanks
also sorry for my poor English:)
03:54
Or tonight. I'm not sure about my time today. You can leave questions here, and I'll try to answer when I see them.
 
1 hour later…
05:00
I see:)
 
4 hours later…
08:52
Yes, you got it @Shutao; that's precisely the permutation I had in mind.
I am trying other method, the following is chord length
this matrix just for equal spaced parametrization for degree 3
In addition, I discovered that the conditional number of matrix will increase when degree increases.
So J.M., I have a question: how to construct a well-conditioned matrix.
I think it is very imortant for solving the control-points of B-spline.
Did you have any suggestions or strategies for that question? thanks:)
09:53
@Shutao, Your condition numbers don't seem to go above 100 or so, so you can only expect a loss of two significant digits
That's not too bad.
If you encounter a matrix with κ = 10^7, then you start worrying.
BTW: if you read the answer I linked you to: LinearAlgebra`MatrixConditionNumber[] is what you need if you only want κ.

  last day (40 days later) »